Mercurial > hg > nginx
comparison src/event/ngx_event_openssl.c @ 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 |
comparison
equal
deleted
inserted
replaced
5022:1d819608ad4a | 5023:70a35b7b63ea |
---|---|
1166 buf->pos = buf->start; | 1166 buf->pos = buf->start; |
1167 buf->last = buf->start; | 1167 buf->last = buf->start; |
1168 buf->end = buf->start + NGX_SSL_BUFSIZE; | 1168 buf->end = buf->start + NGX_SSL_BUFSIZE; |
1169 } | 1169 } |
1170 | 1170 |
1171 send = 0; | 1171 send = buf->last - buf->pos; |
1172 flush = (in == NULL) ? 1 : buf->flush; | 1172 flush = (in == NULL) ? 1 : buf->flush; |
1173 | 1173 |
1174 for ( ;; ) { | 1174 for ( ;; ) { |
1175 | 1175 |
1176 while (in && buf->last < buf->end && send < limit) { | 1176 while (in && buf->last < buf->end && send < limit) { |