comparison src/http/modules/ngx_http_upstream_keepalive_module.c @ 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 3e5b630e0ec9
children 4d8936b1fc32
comparison
equal deleted inserted replaced
5863:102f85699420 5864:39befd3c0d84
246 246
247 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0, 247 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, pc->log, 0,
248 "get keepalive peer: using connection %p", c); 248 "get keepalive peer: using connection %p", c);
249 249
250 c->idle = 0; 250 c->idle = 0;
251 c->sent = 0;
251 c->log = pc->log; 252 c->log = pc->log;
252 c->read->log = pc->log; 253 c->read->log = pc->log;
253 c->write->log = pc->log; 254 c->write->log = pc->log;
254 c->pool->log = pc->log; 255 c->pool->log = pc->log;
255 256