X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-14-duplex-both-read.c;h=ed77cab8ac69d4530f0525c24f6c1db22407fb17;hb=c8f5d9df177cb3326c2b27909b9925521490c7b9;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..ed77cab8 100644 --- a/ccan/io/test/run-14-duplex-both-read.c +++ b/ccan/io/test/run-14-duplex-both-read.c @@ -8,11 +8,7 @@ #include #include -#ifdef DEBUG_CONN -#define PORT "64014" -#else #define PORT "65014" -#endif struct data { struct io_listener *l; @@ -29,10 +25,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) @@ -46,9 +43,6 @@ static struct io_plan *make_duplex(struct io_conn *conn, struct data *d) static struct io_plan *init_conn(struct io_conn *conn, struct data *d) { -#ifdef DEBUG_CONN - io_set_debug(conn, true); -#endif ok1(d->state == 0); d->state++;