Browse Source

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>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
217df2d2e8
  1. 4
      lightningd/channel/channel.c

4
lightningd/channel/channel.c

@ -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…
Cancel
Save