X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-14-duplex-both-read.c;fp=ccan%2Fio%2Ftest%2Frun-14-duplex-both-read.c;h=30c46cd5dbd79fd2909a5a36339cd2b7a8089a88;hb=d8ecdc8021b532fe76f001290fcd79c4fb9e1323;hp=ac334e7837be7d057e307b5e4aa1caa0f453878e;hpb=43185ec669720903fa86aac5f2d1b1ee62e3a12b;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)