Browse Source

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

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
trytravis
Rusty Russell 6 years ago
parent
commit
ea2c03e2e2
  1. 9
      gossipd/gossipd.c

9
gossipd/gossipd.c

@ -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;
}

Loading…
Cancel
Save