Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We were getting the following message in test_feerate_stress: ``` 2024-07-08T02:15:45.5663941Z lightningd-2 2024-07-08T02:13:45.696Z **BROKEN** 0266e4598d1d3c415f572a8488830b60f7e744ed9235eb0b1ba93283b315c03518-connectd: Peer did not close, forcing close ``` I can reproduce it locally if I run the test enough, and finally found the issue by printing the status of the fd when we time it out (using routines from connectd.c). The peer fd alternates between reading and writing. When we go to discard it, we wake the write queue, so write_to_peer() get called. It won't shutdown the socket if there are still subds attached, and will wait again for a read. The last subd exit has to also wake the write queue if we're draining, so it can do the io_sock_shutdown. Otherwise, we hit the timeout, causing the message above. Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information