mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +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:
parent
f5624af965
commit
217df2d2e8
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user