mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
peer_disconnect: simply free if in STATE_INIT.
db_forget_peer() was harmless, but we haven't been entered into the database yet anyway, and it asserted that we should have been STATE_CLOSED. Closes: #67 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
c2d71497ff
commit
3372645d8e
@ -2603,9 +2603,7 @@ static void peer_disconnect(struct io_conn *conn, struct peer *peer)
|
|||||||
|
|
||||||
/* Not even set up yet? Simply free.*/
|
/* Not even set up yet? Simply free.*/
|
||||||
if (peer->state == STATE_INIT) {
|
if (peer->state == STATE_INIT) {
|
||||||
/* FIXME: Make reconnect work for STATE_INIT, but
|
/* This means we didn't get past crypto handshake or hit db */
|
||||||
* cleanup if we don't reconnect after some duration. */
|
|
||||||
db_forget_peer(peer);
|
|
||||||
tal_free(peer);
|
tal_free(peer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user