|
@ -803,7 +803,7 @@ static struct server * new_server(int fd, struct listen_ctx *listener) |
|
|
ev_io_init(&server->recv_ctx->io, server_recv_cb, fd, EV_READ); |
|
|
ev_io_init(&server->recv_ctx->io, server_recv_cb, fd, EV_READ); |
|
|
ev_io_init(&server->send_ctx->io, server_send_cb, fd, EV_WRITE); |
|
|
ev_io_init(&server->send_ctx->io, server_send_cb, fd, EV_WRITE); |
|
|
ev_timer_init(&server->recv_ctx->watcher, server_timeout_cb, |
|
|
ev_timer_init(&server->recv_ctx->watcher, server_timeout_cb, |
|
|
min(10, listener->timeout), listener->timeout); |
|
|
|
|
|
|
|
|
min(MAX_CONNECT_TIMEOUT, listener->timeout), listener->timeout); |
|
|
server->recv_ctx->server = server; |
|
|
server->recv_ctx->server = server; |
|
|
server->recv_ctx->connected = 0; |
|
|
server->recv_ctx->connected = 0; |
|
|
server->send_ctx->server = server; |
|
|
server->send_ctx->server = server; |
|
|