summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_conn_accept.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-10-17 16:22:38 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-10-17 16:22:38 +0300
commit09ef66d39c277ed709e2333f992b1d87304bf663 (patch)
tree980e60508cb4c86b2a6637616001d10eaeb8f393 /src/nxt_conn_accept.c
parent1c6d4d8cff1f9c2da56ce6cc433c17b2d69fca2b (diff)
downloadunit-09ef66d39c277ed709e2333f992b1d87304bf663.tar.gz
unit-09ef66d39c277ed709e2333f992b1d87304bf663.tar.bz2
Storing memory cache slot hint inside nxt_sockaddr_t.
Diffstat (limited to '')
-rw-r--r--src/nxt_conn_accept.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nxt_conn_accept.c b/src/nxt_conn_accept.c
index 53bbe83e..fbafc553 100644
--- a/src/nxt_conn_accept.c
+++ b/src/nxt_conn_accept.c
@@ -46,8 +46,6 @@ nxt_listen_event(nxt_task_t *task, nxt_listen_socket_t *ls)
engine = task->thread->engine;
lev->batch = engine->batch;
- lev->mem_cache = (uint32_t) -1;
-
lev->socket.read_work_queue = &engine->accept_work_queue;
lev->socket.read_handler = nxt_conn_listen_handler;
lev->socket.error_handler = nxt_conn_listen_event_error;
@@ -105,7 +103,7 @@ nxt_conn_accept_alloc(nxt_task_t *task, nxt_listen_event_t *lev)
c->socket.write_ready = 1;
c->listen = lev;
- c->remote = nxt_sockaddr_cache_alloc(engine, lev);
+ c->remote = nxt_sockaddr_cache_alloc(engine, lev->listen);
if (nxt_fast_path(c->remote != NULL)) {
return c;
}