Mercurial > hg > nginx-tests
comparison stream_proxy_protocol_ipv6.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 | 0016fe31be13 |
children | 77359b849cd5 |
comparison
equal
deleted
inserted
replaced
710:aed139eaaf3f | 711:824754da4afc |
---|---|
117 sub stream_read { | 117 sub stream_read { |
118 my ($s) = @_; | 118 my ($s) = @_; |
119 my ($buf); | 119 my ($buf); |
120 | 120 |
121 $s->blocking(0); | 121 $s->blocking(0); |
122 if (IO::Select->new($s)->can_read(3)) { | 122 if (IO::Select->new($s)->can_read(5)) { |
123 $s->sysread($buf, 1024); | 123 $s->sysread($buf, 1024); |
124 }; | 124 }; |
125 | 125 |
126 log_in($buf); | 126 log_in($buf); |
127 return $buf; | 127 return $buf; |