]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-14-duplex-both-read.c
ccan/io: io_halfclose.
[ccan] / ccan / io / test / run-14-duplex-both-read.c
index ac334e7837be7d057e307b5e4aa1caa0f453878e..30c46cd5dbd79fd2909a5a36339cd2b7a8089a88 100644 (file)
@@ -29,10 +29,11 @@ static void finish_ok(struct io_conn *conn, struct data *d)
 static struct io_plan *end(struct io_conn *conn, struct data *d)
 {
        d->state++;
+       /* Close on top of halfclose should work. */
        if (d->state == 4)
                return io_close(conn);
        else
-               return io_wait(conn, NULL, io_never, NULL);
+               return io_halfclose(conn);
 }
 
 static struct io_plan *make_duplex(struct io_conn *conn, struct data *d)