From ef9d8bcd5a15ef2dc43457b008849176b3838a12 Mon Sep 17 00:00:00 2001 From: niftynei Date: Thu, 6 May 2021 16:41:29 -0500 Subject: [PATCH] dual-fund: reconnections were borked, this fixes them --- lightningd/peer_control.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 8ea38f1cd..a6c51c1af 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -384,17 +384,16 @@ void channel_errmsg(struct channel *channel, /* Clean up any in-progress open attempts */ channel_cleanup_commands(channel, desc); + if (channel_unsaved(channel)) { + log_info(channel->log, "%s", "Unsaved peer failed." + " Disconnecting and deleting channel."); + delete_channel(channel); + return; + } + /* No per_peer_state means a subd crash or disconnection. */ if (!pps) { /* If the channel is unsaved, we forget it */ - if (channel_unsaved(channel)) { - log_unusual(channel->log, "%s", - "Unsaved peer failed." - " Disconnecting and deleting channel."); - delete_channel(channel); - return; - } - channel_fail_reconnect(channel, "%s: %s", channel->owner->name, desc); return;