mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
Merge pull request #83 from ElementsProject/fix-67-crash-on-forget
peer_disconnect: simply free if in STATE_INIT.
This commit is contained in:
commit
b26afcb3df
@ -2603,9 +2603,7 @@ static void peer_disconnect(struct io_conn *conn, struct peer *peer)
|
||||
|
||||
/* Not even set up yet? Simply free.*/
|
||||
if (peer->state == STATE_INIT) {
|
||||
/* FIXME: Make reconnect work for STATE_INIT, but
|
||||
* cleanup if we don't reconnect after some duration. */
|
||||
db_forget_peer(peer);
|
||||
/* This means we didn't get past crypto handshake or hit db */
|
||||
tal_free(peer);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user