else {
count++;
close(fd);
- newconn(b);
}
+ newconn(b);
}
static void timeout(struct timeval *tv, void *p)
goto fail;
gettimeofday(&tv, 0);
TV_ADD(&tv, &tv, &ctv);
+ if (conn_init(&b->c, &sel, fd, (struct sockaddr *)&sin, sizeof(sin),
+ connected, b))
+ goto fail;
sel_addtimer(&sel, &b->t, &tv, timeout, b);
- conn_init(&b->c, &sel, fd, (struct sockaddr *)&sin, sizeof(sin),
- connected, b);
return;
fail: