diff --git a/btpd/btpd.c b/btpd/btpd.c index f49511d..6d48d55 100644 --- a/btpd/btpd.c +++ b/btpd/btpd.c @@ -126,9 +126,4 @@ btpd_init(void) timer_init(&m_grace_timer, grace_cb, NULL); timer_init(&m_heartbeat, heartbeat_cb, NULL); btpd_timer_add(&m_heartbeat, (& (struct timespec) { 1, 0 })); - - if (!empty_start) - active_start(); - else - active_clear(); } diff --git a/btpd/main.c b/btpd/main.c index 74f071e..2972540 100644 --- a/btpd/main.c +++ b/btpd/main.c @@ -269,6 +269,12 @@ args_done: setlinebuf(stderr); btpd_daemon_phase = 0; + + if (!empty_start) + active_start(); + else + active_clear(); + evloop(); btpd_err("Exit from evloop with error (%s).\n", strerror(errno));