changeset 5023:70a35b7b63ea

SSL: take into account data in the buffer while limiting output. In some rare cases this can result in a more smooth sending rate.
author Valentin Bartenev <vbart@nginx.com>
date Mon, 28 Jan 2013 15:41:12 +0000
parents 1d819608ad4a
children 03513220b83b
files src/event/ngx_event_openssl.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -1168,7 +1168,7 @@ ngx_ssl_send_chain(ngx_connection_t *c, 
         buf->end = buf->start + NGX_SSL_BUFSIZE;
     }
 
-    send = 0;
+    send = buf->last - buf->pos;
     flush = (in == NULL) ? 1 : buf->flush;
 
     for ( ;; ) {