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