Mercurial > hg > nginx-tests
comparison stream_access.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 | 1925b27f24b6 |
children | 22b06c04b37f |
comparison
equal
deleted
inserted
replaced
710:aed139eaaf3f | 711:824754da4afc |
---|---|
241 sub stream_read { | 241 sub stream_read { |
242 my ($s) = @_; | 242 my ($s) = @_; |
243 my ($buf); | 243 my ($buf); |
244 | 244 |
245 $s->blocking(0); | 245 $s->blocking(0); |
246 if (IO::Select->new($s)->can_read(3)) { | 246 if (IO::Select->new($s)->can_read(5)) { |
247 $s->sysread($buf, 1024); | 247 $s->sysread($buf, 1024); |
248 }; | 248 }; |
249 | 249 |
250 log_in($buf); | 250 log_in($buf); |
251 return $buf; | 251 return $buf; |