From a552130d3dd154ee7a2a8e158ac59788702de136 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 16 Apr 2019 12:52:21 +0930 Subject: [PATCH] lightningd: make sure we correctly clear connections from connectd on error. Without this, the connect command hangs in one of my branches. This logic is from the old days when gossipd handled connections, and we wanted to make sure it didn't hang up on this client due to the error. Signed-off-by: Rusty Russell --- CHANGELOG.md | 1 + lightningd/peer_control.c | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27f6a29df..ad017112a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ changes. - lightning-cli: arguments containing `"` now succeed, rather than causing JSON errors. - protocol: handle lnd sending more messages before `reestablish`; don't fail channel, and handle older lnd's spurious empty commitments. - Fixed `fundchannel` crash when we have many UTXOs and we skip unconfirmed ones. +- lightningd: fixed occasional hang on `connect` when peer had sent error. ### Security diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 4649ef0ac..84534085f 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -388,8 +388,6 @@ void channel_errmsg(struct channel *channel, err_for_them, tal_count(err_for_them), 0); - /* Make sure channel_fail_permanent doesn't tell connectd we died! */ - channel->connected = false; notify_disconnect(channel->peer->ld, &channel->peer->id); /* BOLT #1: