X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-14-duplex-both-read.c;h=30c46cd5dbd79fd2909a5a36339cd2b7a8089a88;hb=8f116a81b39b55031212abb0be2ad088cbf9fd87;hp=ac334e7837be7d057e307b5e4aa1caa0f453878e;hpb=318f717e34e4735e5397bee24dbbee69205be82b;p=ccan diff --git a/ccan/io/test/run-14-duplex-both-read.c b/ccan/io/test/run-14-duplex-both-read.c index ac334e78..30c46cd5 100644 --- a/ccan/io/test/run-14-duplex-both-read.c +++ b/ccan/io/test/run-14-duplex-both-read.c @@ -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)