From 9bbb32433e114cf12a76313b8cc9c400c96621fa Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 22 Mar 2022 19:20:13 +1030 Subject: [PATCH] connectd: make sure we do IO logging on final_msg output. This happens when we send a warning or lightningd tells us to send a final message then close. Normally io logging is done by the subdaemon that creates it, but this is a special case. Signed-off-by: Rusty Russell --- connectd/multiplex.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connectd/multiplex.c b/connectd/multiplex.c index f94175b32..3a918500b 100644 --- a/connectd/multiplex.c +++ b/connectd/multiplex.c @@ -577,6 +577,8 @@ static struct io_plan *write_to_peer(struct io_conn *peer_conn, /* OK, send this then close. */ msg = peer->final_msg; peer->final_msg = NULL; + /* Wasn't logged earlier, so do it now */ + status_peer_io(LOG_IO_OUT, &peer->id, msg); } /* Still nothing to send? */