mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-10 00:24:19 +01:00
lightningd: fix crash on failed close.
Fixes: #2056 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
608b1a236b
commit
322d483b36
@@ -946,9 +946,11 @@ static void json_close(struct command *cmd,
|
||||
if (channel->state != CHANNELD_NORMAL &&
|
||||
channel->state != CHANNELD_AWAITING_LOCKIN &&
|
||||
channel->state != CHANNELD_SHUTTING_DOWN &&
|
||||
channel->state != CLOSINGD_SIGEXCHANGE)
|
||||
channel->state != CLOSINGD_SIGEXCHANGE) {
|
||||
command_fail(cmd, LIGHTNINGD, "Channel is in state %s",
|
||||
channel_state_name(channel));
|
||||
return;
|
||||
}
|
||||
|
||||
/* If normal or locking in, transition to shutting down
|
||||
* state.
|
||||
|
||||
Reference in New Issue
Block a user