Browse Source

peer: fix close before their sig has been received in corner case.

If we haven't received their closing signature yet, we might try to
send the closing packet anyway (and segfault).  Make sure we have
their signature before trying that.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 8 years ago
parent
commit
9bd6a10f49
  1. 2
      daemon/peer.c

2
daemon/peer.c

@ -1382,7 +1382,7 @@ static bool shutdown_pkt_in(struct peer *peer, const Pkt *pkt)
break;
}
if (!err && !committed_to_htlcs(peer))
if (!err && !committed_to_htlcs(peer) && peer->closing.their_script)
err = start_closing(peer);
if (err)

Loading…
Cancel
Save