mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
connectd: cleanup gossip connection properly
This still has a problem, but we can't fix that easily here; per-peer daemons don't have this trouble, however. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -632,6 +632,8 @@ static struct io_plan *ready_for_master(struct io_conn *conn, struct peer *peer)
|
||||
peer->gfeatures,
|
||||
peer->lfeatures);
|
||||
|
||||
/* FIXME: This can leave half-read/written gossip messages! */
|
||||
io_close_taken_fd(peer->local->gossip_conn.conn);
|
||||
send_peer_with_fds(peer, take(msg));
|
||||
/* In case we set this earlier. */
|
||||
tal_del_destructor(peer, fail_release);
|
||||
|
||||
Reference in New Issue
Block a user