lightningd/hsm: shutdown when master conn is freed.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-04-11 23:26:00 -07:00
parent 3509f10e30
commit 3c5a70910a

View File

@ -83,6 +83,8 @@ static struct client *new_client(struct daemon_conn *master,
c->master = master; c->master = master;
daemon_conn_init(c, &c->dc, fd, handle); daemon_conn_init(c, &c->dc, fd, handle);
/* Free the connection if we exit everything. */
tal_steal(master, c->dc.conn);
/* Free client when connection freed. */ /* Free client when connection freed. */
tal_steal(c->dc.conn, c); tal_steal(c->dc.conn, c);
return c; return c;