Klaus Demo nginx / d2ea226
SSL: improved ngx_ssl_recv_chain() to stop if c->read->ready is 0. As long as there are data to read in the socket, yet the amount of data is less than total size of the buffers in the chain, this saves one unneeded read() syscall. Before this change, reading only stopped if ngx_ssl_recv() returned no data, that is, two read() syscalls in a row returned EAGAIN. Maxim Dounin 27 days ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
19201920 if (n > 0) {
19211921 last += n;
19221922 bytes += n;
1923
1924 if (!c->read->ready) {
1925 return bytes;
1926 }
19231927
19241928 if (last == b->end) {
19251929 cl = cl->next;