commit | 471e462c1642b38a815eae15d7e4d3fe0a008495 | [log] [tgz] |
---|---|---|
author | Roman Arutyunyan <arut@nginx.com> | Wed Aug 29 15:56:42 2018 +0300 |
committer | Roman Arutyunyan <arut@nginx.com> | Wed Aug 29 15:56:42 2018 +0300 |
tree | c1ba2dbc26a26180b177c0af24cdbea60b0276c2 | |
parent | 5cc108885e8606a776121977d36d4339f7b1d0bc [diff] |
Stream: avoid potential infinite loop at preread phase. Previously the preread phase code ignored NGX_AGAIN value returned from c->recv() and relied only on c->read->ready. But this flag is not reliable and should only be checked for optimization purposes. For example, when using SSL, c->read->ready may be set when no input is available. This can lead to calling preread handler infinitely in a loop.