From 468d3fd3875a9362cf489bd5918cebe73fc0e1d7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 12 Sep 2023 13:53:19 +0930 Subject: [PATCH] connectd: also don't disconnect on "all-channel" warnings. Signed-off-by: Rusty Russell --- connectd/multiplex.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/connectd/multiplex.c b/connectd/multiplex.c index ce69b1dcc..1864b3784 100644 --- a/connectd/multiplex.c +++ b/connectd/multiplex.c @@ -1109,12 +1109,14 @@ static struct io_plan *read_body_from_peer_done(struct io_conn *peer_conn, status_peer_io(LOG_IO_IN, &peer->id, decrypted); /* Could be a all-channel error or warning? Log it - * more verbose, and hang up. */ + * more verbose: hang up on error. */ if (type == WIRE_ERROR || type == WIRE_WARNING) { char *desc = sanitize_error(tmpctx, decrypted, NULL); status_peer_info(&peer->id, "Received %s: %s", peer_wire_name(type), desc); + if (type == WIRE_WARNING) + return read_hdr_from_peer(peer_conn, peer); return io_close(peer_conn); }