SSL: take into account data in the buffer while limiting output.

In some rare cases this can result in a more smooth sending rate.
This commit is contained in:
Valentin Bartenev 2013-01-28 15:41:12 +00:00
parent 0f0fac70a1
commit 733e6d2ac6

View File

@ -1168,7 +1168,7 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
buf->end = buf->start + NGX_SSL_BUFSIZE; buf->end = buf->start + NGX_SSL_BUFSIZE;
} }
send = 0; send = buf->last - buf->pos;
flush = (in == NULL) ? 1 : buf->flush; flush = (in == NULL) ? 1 : buf->flush;
for ( ;; ) { for ( ;; ) {