From 7fed03b9109d09285964a9067cb9982ca0a58b2d Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 30 Sep 2025 11:33:27 +0930 Subject: [PATCH] pytest: fix broken message in test_even_sendcustommsg. We can stop listening on the incoming peer while we are closing, so we don't notice if they close: ``` ['lightningd-2 2025-09-03T09:48:19.555Z **BROKEN** 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Peer did not close, forcing close', 'lightningd-2 2025-09-03T09:48:22.918Z **BROKEN** 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Peer did not close, forcing close'] =========================== short test summary info ============================ ERROR tests/test_misc.py::test_even_sendcustommsg - ValueError: ``` 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 0d5ac0dc5..99137a0f5 100644 --- a/connectd/multiplex.c +++ b/connectd/multiplex.c @@ -1082,8 +1082,10 @@ static struct io_plan *write_to_peer(struct io_conn *peer_conn, /* Still nothing to send? */ if (!msg) { /* Draining? We're done when subds are done. */ - if (peer->draining && tal_count(peer->subds) == 0) + if (peer->draining && tal_count(peer->subds) == 0) { + io_wake(&peer->peer_in); return io_sock_shutdown(peer_conn); + } /* If they want us to send gossip, do so now. */ if (!peer->draining)