From: Maxim Dounin Date: Mon, 29 Sep 2014 18:27:45 +0000 (+0400) Subject: Upstream keepalive: reset c->sent on cached connections. X-Git-Tag: release-1.7.6~1 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=403a9efc0c1f50333b65d5c86deb80c794e45595;p=nginx.git 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. --- diff --git a/src/http/modules/ngx_http_upstream_keepalive_module.c b/src/http/modules/ngx_http_upstream_keepalive_module.c index c1c1c70d6..f738f0cc1 100644 --- 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_peer_connection_t *pc, void *data) "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;