]> git.ozlabs.org Git - ccan/commitdiff
ccan/io: fix misleading comment in previous commit.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Sep 2025 02:56:14 +0000 (12:26 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Sep 2025 02:58:47 +0000 (12:28 +0930)
We don't need to be duplex to have this problem: the write side
does it too in the example I found.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/io/io.c

index 178ab01bcf956679eb657bd568820f8a2ba03e3a..baa9a497cc56b994d3eb8d94bbefcf2bd8ca9240 100644 (file)
@@ -584,11 +584,8 @@ struct io_plan *io_sock_shutdown(struct io_conn *conn)
                return io_close(conn);
 
        /* We need to make sure we don't try to write again, so
-        * "wait" on something which will never be woken.
-        *
-        * In the duplex case, we can call io_sock_shutdown on the
-        * input side, while io_write is going on on the output side.
-        * Then we will try to write, fail, and immediately close. */
+        * "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);
 }