mirror of
https://github.com/nginx/nginx.git
synced 2025-06-09 02:42:48 +08:00
ngx_http_keepalive_handler() is now trying to not keep c->buffer's memory for
idle connections. This behaviour is consistent with the ngx_http_set_keepalive() function and it should decrease memory usage in some cases (especially if epoll/rtsig is used).
This commit is contained in:
parent
f7b32c479d
commit
09dca40b33
@ -2753,6 +2753,20 @@ ngx_http_keepalive_handler(ngx_event_t *rev)
|
|||||||
ngx_http_close_connection(c);
|
ngx_http_close_connection(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Like ngx_http_set_keepalive() we are trying to not hold
|
||||||
|
* c->buffer's memory for a keepalive connection.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (ngx_pfree(c->pool, b->start) == NGX_OK) {
|
||||||
|
|
||||||
|
/*
|
||||||
|
* the special note that c->buffer's memory was freed
|
||||||
|
*/
|
||||||
|
|
||||||
|
b->pos = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user