mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 08:34:20 +01:00
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:
@@ -2166,6 +2166,7 @@ static struct io_plan *recv_req(struct io_conn *conn,
|
|||||||
|
|
||||||
static void master_gone(struct daemon_conn *master UNUSED)
|
static void master_gone(struct daemon_conn *master UNUSED)
|
||||||
{
|
{
|
||||||
|
daemon_shutdown();
|
||||||
/* Can't tell master, it's gone. */
|
/* Can't tell master, it's gone. */
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
@@ -2195,12 +2196,6 @@ int main(int argc, char *argv[])
|
|||||||
struct timer *expired = NULL;
|
struct timer *expired = NULL;
|
||||||
io_loop(&daemon->timers, &expired);
|
io_loop(&daemon->timers, &expired);
|
||||||
|
|
||||||
if (!expired) {
|
timer_expired(daemon, expired);
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
timer_expired(daemon, expired);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
daemon_shutdown();
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user