X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-14-duplex-both-read.c;h=d1868e2ee63e562f319e7963bfa10c6f0bacaa2b;hb=12e924346b342c61219a3fdc57eb6b00a27f1cd1;hp=366f1d44bbaafdf65c09baa1942a490df6c60053;hpb=dded32f2b03fca526271e35671fa36d299880429;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 366f1d44..d1868e2e 100644 --- a/ccan/io/test/run-14-duplex-both-read.c +++ b/ccan/io/test/run-14-duplex-both-read.c @@ -12,8 +12,6 @@ #define PORT "65014" #endif -#define is_idle(conn) ((conn)->plan.io == NULL) - struct data { struct io_listener *l; int state; @@ -30,16 +28,7 @@ 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++; - - /* last one out closes. */ - if (conn == d->c1 && is_idle(d->c2)) - return io_close(); - - /* last one out closes. */ - if (conn == d->c2 && is_idle(d->c1)) - return io_close(); - - return io_idle(); + return io_close(); } static struct io_plan make_duplex(struct io_conn *conn, struct data *d)