mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-09 08:04:19 +01:00
channeld: fix shutdown when we have to complete HTLCs.
We need to check if we exit after sending a revoke_and_ack, otherwise channeld ends up getting the closing_signed packet. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -701,6 +701,10 @@ static struct io_plan *send_revocation(struct io_conn *conn, struct peer *peer)
|
||||
|
||||
msg_enqueue(&peer->peer_out, take(msg));
|
||||
|
||||
/* This might have been the final revoke_and_ack... */
|
||||
if (shutdown_complete(peer))
|
||||
io_break(peer);
|
||||
|
||||
return peer_read_message(conn, &peer->pcs, peer_in);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user