# HG changeset patch # User Valentin Bartenev # Date 1359387672 0 # Node ID 70a35b7b63ea4ffdff9fc92eec554d8da5da3e66 # Parent 1d819608ad4a72df6208e4c9d304a27e261cf056 SSL: take into account data in the buffer while limiting output. In some rare cases this can result in a more smooth sending rate. diff -r 1d819608ad4a -r 70a35b7b63ea src/event/ngx_event_openssl.c --- a/src/event/ngx_event_openssl.c Mon Jan 28 15:40:25 2013 +0000 +++ b/src/event/ngx_event_openssl.c Mon Jan 28 15:41:12 2013 +0000 @@ -1168,7 +1168,7 @@ buf->end = buf->start + NGX_SSL_BUFSIZE; } - send = 0; + send = buf->last - buf->pos; flush = (in == NULL) ? 1 : buf->flush; for ( ;; ) {