diff options
author | Vladimir Homutov <vl@nginx.com> | 2017-01-11 12:01:56 +0300 |
---|---|---|
committer | Vladimir Homutov <vl@nginx.com> | 2017-01-11 12:01:56 +0300 |
commit | b580770f3afaeec48a15cb8c9d2f9cf72b14e4da (patch) | |
tree | 7de64f5ec0e322a29eafa3d857f611d56544c444 /src | |
parent | bd6d8b54550e8548a3cad416124959c8053babf2 (diff) | |
download | nginx-b580770f3afaeec48a15cb8c9d2f9cf72b14e4da.tar.gz nginx-b580770f3afaeec48a15cb8c9d2f9cf72b14e4da.zip |
Stream: avoid infinite loop in case of socket read error.
Diffstat (limited to 'src')
-rw-r--r-- | src/stream/ngx_stream_proxy_module.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c index bfd78d5bb..81a0891de 100644 --- a/src/stream/ngx_stream_proxy_module.c +++ b/src/stream/ngx_stream_proxy_module.c @@ -1534,8 +1534,9 @@ ngx_stream_proxy_process(ngx_stream_session_t *s, ngx_uint_t from_upstream, size = b->end - b->last; - if (size && src->read->ready && !src->read->delayed) { - + if (size && src->read->ready && !src->read->delayed + && !src->read->error) + { if (limit_rate) { limit = (off_t) limit_rate * (ngx_time() - u->start_sec + 1) - *received; |