]> git.kaiwu.me - nginx.git/commit
Stream: avoid potential infinite loop at preread phase.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 29 Aug 2018 12:56:42 +0000 (15:56 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 29 Aug 2018 12:56:42 +0000 (15:56 +0300)
commitd9908c6c9a8ef01b36dc604ace4c00c09135372e
treec1ba2dbc26a26180b177c0af24cdbea60b0276c2
parent73d467cecd4fa6efc748a1186782154931269e36
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.
src/stream/ngx_stream_core_module.c