Mercurial > hg > nginx-quic
comparison src/http/ngx_http_request.c @ 4891:1e666c78a42c
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).
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 23 Oct 2012 14:36:18 +0000 |
parents | e406c997470a |
children | 6f085bfcdb4d |
comparison
equal
deleted
inserted
replaced
4890:173cd5458281 | 4891:1e666c78a42c |
---|---|
2751 if (n == NGX_AGAIN) { | 2751 if (n == NGX_AGAIN) { |
2752 if (ngx_handle_read_event(rev, 0) != NGX_OK) { | 2752 if (ngx_handle_read_event(rev, 0) != NGX_OK) { |
2753 ngx_http_close_connection(c); | 2753 ngx_http_close_connection(c); |
2754 } | 2754 } |
2755 | 2755 |
2756 /* | |
2757 * Like ngx_http_set_keepalive() we are trying to not hold | |
2758 * c->buffer's memory for a keepalive connection. | |
2759 */ | |
2760 | |
2761 if (ngx_pfree(c->pool, b->start) == NGX_OK) { | |
2762 | |
2763 /* | |
2764 * the special note that c->buffer's memory was freed | |
2765 */ | |
2766 | |
2767 b->pos = NULL; | |
2768 } | |
2769 | |
2756 return; | 2770 return; |
2757 } | 2771 } |
2758 | 2772 |
2759 if (n == NGX_ERROR) { | 2773 if (n == NGX_ERROR) { |
2760 ngx_http_close_connection(c); | 2774 ngx_http_close_connection(c); |