#include <sys/wait.h>
#include <stdio.h>
-#ifdef DEBUG_CONN
-#define PORT "64016"
-#else
#define PORT "65016"
-#endif
struct data {
struct io_listener *l;
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)
{
-#ifdef DEBUG_CONN
- io_set_debug(conn, true);
-#endif
ok1(d->state == 0);
d->state++;