gossipd: don't have code to exit final loop; we always leave via master_gone.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-11-13 14:33:53 +10:30
parent 4038061d0f
commit ea2c03e2e2

View file

@ -2166,6 +2166,7 @@ static struct io_plan *recv_req(struct io_conn *conn,
static void master_gone(struct daemon_conn *master UNUSED)
{
daemon_shutdown();
/* Can't tell master, it's gone. */
exit(2);
}
@ -2195,12 +2196,6 @@ int main(int argc, char *argv[])
struct timer *expired = NULL;
io_loop(&daemon->timers, &expired);
if (!expired) {
break;
} else {
timer_expired(daemon, expired);
}
timer_expired(daemon, expired);
}
daemon_shutdown();
return 0;
}