diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2014-09-29 22:27:45 +0400 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2014-09-29 22:27:45 +0400 |
commit | 403a9efc0c1f50333b65d5c86deb80c794e45595 (patch) | |
tree | 0fd9fd1a33f75cd5908ce487b1d6fe5da023d330 /src | |
parent | c9fbbc82731fe54f08bf53fa41677d3f1fd6fbcb (diff) | |
download | nginx-403a9efc0c1f50333b65d5c86deb80c794e45595.tar.gz nginx-403a9efc0c1f50333b65d5c86deb80c794e45595.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/http/modules/ngx_http_upstream_keepalive_module.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |