SSL: calculation of buffer size moved closer to its usage.

No functional changes.
This commit is contained in:
Valentin Bartenev 2013-01-28 15:38:36 +00:00
parent 0f62e193dc
commit f98b1d2561

View File

@ -1207,12 +1207,12 @@ ngx_ssl_send_chain(ngx_connection_t *c, ngx_chain_t *in, off_t limit)
} }
} }
size = buf->last - buf->pos;
if (!flush && send < limit && buf->last < buf->end) { if (!flush && send < limit && buf->last < buf->end) {
break; break;
} }
size = buf->last - buf->pos;
n = ngx_ssl_write(c, buf->pos, size); n = ngx_ssl_write(c, buf->pos, size);
if (n == NGX_ERROR) { if (n == NGX_ERROR) {