mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-03 10:46:58 +01:00
lightningd: fix crash when peer disconnects after fundchannel_start, before cancel/complete
Fixes: #2831 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
f9ecc76d99
commit
710d015e5b
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ static void uncommitted_channel_disconnect(struct uncommitted_channel *uc,
|
||||||
u8 *msg = towire_connectctl_peer_disconnected(tmpctx, &uc->peer->id);
|
u8 *msg = towire_connectctl_peer_disconnected(tmpctx, &uc->peer->id);
|
||||||
log_info(uc->log, "%s", desc);
|
log_info(uc->log, "%s", desc);
|
||||||
subd_send_msg(uc->peer->ld->connectd, msg);
|
subd_send_msg(uc->peer->ld->connectd, msg);
|
||||||
if (uc->fc)
|
if (uc->fc && uc->fc->cmd)
|
||||||
was_pending(command_fail(uc->fc->cmd, LIGHTNINGD, "%s", desc));
|
was_pending(command_fail(uc->fc->cmd, LIGHTNINGD, "%s", desc));
|
||||||
notify_disconnect(uc->peer->ld, &uc->peer->id);
|
notify_disconnect(uc->peer->ld, &uc->peer->id);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue