diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-08-26 13:37:39 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-08-26 13:37:39 +0300 |
commit | 897b860e832c9eba67ba7d01d0775f64ade132f6 (patch) | |
tree | 0bb0d98401a7e8c30e338bc8518c92633b9a8c73 /src/nxt_router.c | |
parent | 1a6036d0227b167c8ac85d3d65a6f60223276367 (diff) | |
download | unit-897b860e832c9eba67ba7d01d0775f64ade132f6.tar.gz unit-897b860e832c9eba67ba7d01d0775f64ade132f6.tar.bz2 |
Introduced nxt_socket_defer_accept().
Diffstat (limited to 'src/nxt_router.c')
-rw-r--r-- | src/nxt_router.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nxt_router.c b/src/nxt_router.c index 8ddddb46..eadc3498 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1053,12 +1053,7 @@ nxt_router_listen_socket_ready(nxt_task_t *task, nxt_port_recv_msg_t *msg, goto fail; } -#ifdef TCP_DEFER_ACCEPT - - /* Defer Linux accept() up to for 1 second. */ - (void) nxt_socket_setsockopt(task, s, IPPROTO_TCP, TCP_DEFER_ACCEPT, 1); - -#endif + nxt_socket_defer_accept(task, s, rpc->socket_conf->sockaddr); ret = nxt_listen_socket(task, s, NXT_LISTEN_BACKLOG); if (nxt_slow_path(ret != NXT_OK)) { |