Browse Source

gossip: make connection own peer.

We steal it when we're closing connection, but we normally want to forget
it if connection just dies.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
5fb1f20898
  1. 3
      lightningd/gossip/gossip.c

3
lightningd/gossip/gossip.c

@ -379,6 +379,9 @@ static struct io_plan *new_peer_got_fd(struct io_conn *conn, struct peer *peer)
if (!peer->conn) {
peer->error = "Could not create connection";
tal_free(peer);
} else {
/* If conn dies, we forget peer. */
tal_steal(peer->conn, peer);
}
return daemon_conn_read_next(conn,&peer->daemon->master);
}

Loading…
Cancel
Save