SSL: account sent bytes in ngx_ssl_write().

This commit is contained in:
Ruslan Ermilov 2015-02-24 23:52:47 +03:00
parent 7dd799357d
commit c2c9a1c03e

View File

@ -1516,7 +1516,6 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
}
in->buf->pos += n;
c->sent += n;
if (in->buf->pos == in->buf->last) {
in = in->next;
@ -1617,7 +1616,6 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
}
buf->pos += n;
c->sent += n;
if (n < size) {
break;
@ -1675,6 +1673,8 @@ ngx_ssl_write(ngx_connection_t *c, u_char *data, size_t size)
ngx_post_event(c->read, &ngx_posted_events);
}
c->sent += n;
return n;
}