ccan: update to get ccan/io shutdown fix.

Changelog-Fixed: Protocol: fix occasional lost sending of final packet (usually warnings or errors).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2025-09-30 11:38:02 +09:30
parent a8566222cf
commit d5677301ef
2 changed files with 5 additions and 3 deletions

View File

@@ -1,3 +1,3 @@
CCAN imported from http://ccodearchive.net.
CCAN version: init-2595-ge43c61c4
CCAN version: init-2597-gc4760b30

View File

@@ -583,8 +583,10 @@ struct io_plan *io_sock_shutdown(struct io_conn *conn)
if (shutdown(io_conn_fd(conn), SHUT_WR) != 0)
return io_close(conn);
/* And leave unset .*/
return &conn->plan[IO_IN];
/* We need to make sure we don't try to write again, so
* "wait" on something which will never be woken: otherwise
* we will try to write, fail, and immediately close. */
return io_wait_dir(conn, io_sock_shutdown, IO_OUT, io_never, NULL);
}
bool io_flush_sync(struct io_conn *conn)