X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-16-duplex-test.c;h=8631be4519f58a0e0603da35e1d539b34af1dcd8;hb=ff71198b4e75fcaaedad34a4e362a3982a936e3e;hp=2081418334ba51b90f20dfe04edad5ea0f4053a8;hpb=318f717e34e4735e5397bee24dbbee69205be82b;p=ccan diff --git a/ccan/io/test/run-16-duplex-test.c b/ccan/io/test/run-16-duplex-test.c index 20814183..8631be45 100644 --- a/ccan/io/test/run-16-duplex-test.c +++ b/ccan/io/test/run-16-duplex-test.c @@ -29,9 +29,7 @@ static void finish_ok(struct io_conn *conn, struct data *d) static struct io_plan *io_done(struct io_conn *conn, struct data *d) { d->state++; - if (d->state == 3) - return io_close(conn); - return io_wait(conn, d, io_close_cb, NULL); + return io_halfclose(conn); } static struct io_plan *init_conn(struct io_conn *conn, struct data *d)