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