rgb-cln/tests
Rusty Russell 2fe2a0bcf9 peer_control: don't double-free on permanent fail of non-persistent peer.
peer_fail_permanent() frees peer->owner, but for bad_peer() we're
being called by the sd->badpeercb(), which then goes on to
io_close(conn) which is a child of sd.

We need to detach the two for this case, so neither tries to free the
other.

This leads to a corner case when the subd exits after the peer is gone:
subd->peer is NULL, so we have to handle that too.

Fixes: #282
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-28 15:37:43 +02:00
..
requirements.txt pytest: Using python-bitcoinlib instead of python-bitcoinrpc 2017-01-23 10:37:34 +01:00
test_lightningd.py peer_control: don't double-free on permanent fail of non-persistent peer. 2017-09-28 15:37:43 +02:00
utils.py test_lightningd: rename has_failed to allow_failure. 2017-09-28 13:07:05 +09:30