Mercurial > hg > nginx-tests
comparison stream_limit_rate.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 | aed139eaaf3f |
children | a53c310c695d |
comparison
equal
deleted
inserted
replaced
710:aed139eaaf3f | 711:824754da4afc |
---|---|
180 sub stream_read { | 180 sub stream_read { |
181 my ($s) = @_; | 181 my ($s) = @_; |
182 my ($buf); | 182 my ($buf); |
183 | 183 |
184 $s->blocking(0); | 184 $s->blocking(0); |
185 if (IO::Select->new($s)->can_read(3)) { | 185 if (IO::Select->new($s)->can_read(5)) { |
186 $s->sysread($buf, 1024); | 186 $s->sysread($buf, 1024); |
187 }; | 187 }; |
188 | 188 |
189 log_in($buf); | 189 log_in($buf); |
190 return $buf; | 190 return $buf; |