Mercurial > hg > nginx-tests
comparison stream_proxy.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 | ba6cc90e3d67 |
children | 984bfe661cce |
comparison
equal
deleted
inserted
replaced
710:aed139eaaf3f | 711:824754da4afc |
---|---|
97 sub stream_read { | 97 sub stream_read { |
98 my ($s) = @_; | 98 my ($s) = @_; |
99 my ($buf); | 99 my ($buf); |
100 | 100 |
101 $s->blocking(0); | 101 $s->blocking(0); |
102 if (IO::Select->new($s)->can_read(3)) { | 102 if (IO::Select->new($s)->can_read(5)) { |
103 $s->sysread($buf, 1024); | 103 $s->sysread($buf, 1024); |
104 }; | 104 }; |
105 | 105 |
106 log_in($buf); | 106 log_in($buf); |
107 return $buf; | 107 return $buf; |