Mercurial > hg > nginx-tests
comparison stream_upstream_least_conn.t @ 711:824754da4afc
Tests: adjusted socket read timeout in stream tests.
Read timeout was increased to prevent situation when data is delayed with
more than 3 seconds. In this case, part of the response could be cut off.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Wed, 23 Sep 2015 18:29:34 +0300 |
parents | 4296379213c8 |
children | b8db75ef1f00 |
comparison
equal
deleted
inserted
replaced
710:aed139eaaf3f | 711:824754da4afc |
---|---|
159 sub stream_read { | 159 sub stream_read { |
160 my ($s) = @_; | 160 my ($s) = @_; |
161 my ($buf); | 161 my ($buf); |
162 | 162 |
163 $s->blocking(0); | 163 $s->blocking(0); |
164 if (IO::Select->new($s)->can_read(3)) { | 164 if (IO::Select->new($s)->can_read(5)) { |
165 $s->sysread($buf, 1024); | 165 $s->sysread($buf, 1024); |
166 }; | 166 }; |
167 | 167 |
168 log_in($buf); | 168 log_in($buf); |
169 return $buf; | 169 return $buf; |