Mercurial > hg > nginx
diff src/stream/ngx_stream_upstream_random_module.c @ 7345:fe767c99c2ad
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.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 29 Aug 2018 15:56:42 +0300 |
parents | f2396ecf608b |
children |