changeset 5864:39befd3c0d84

Upstream keepalive: reset c->sent on cached connections. The c->sent is reset to 0 on each request by server-side http code, so do the same on client side. This allows to count number of bytes sent in a particular request.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 29 Sep 2014 22:27:45 +0400
parents 102f85699420
children a8d111bb6884
files src/http/modules/ngx_http_upstream_keepalive_module.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_upstream_keepalive_module.c
+++ b/src/http/modules/ngx_http_upstream_keepalive_module.c
@@ -248,6 +248,7 @@ ngx_http_upstream_get_keepalive_peer(ngx
                            "get keepalive peer: using connection %p", c);
 
             c->idle = 0;
+            c->sent = 0;
             c->log = pc->log;
             c->read->log = pc->log;
             c->write->log = pc->log;