Mercurial > hg > nginx-tests
comparison ssl_proxy_upgrade.t @ 591:0b059d5e6887
Tests: retry on SSL_WANT_READ in ssl_proxy_upgrade.t.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 26 May 2015 19:35:36 +0300 |
parents | a9569f57da98 |
children | 1177e4dd249a |
comparison
equal
deleted
inserted
replaced
590:dc2f8aac0553 | 591:0b059d5e6887 |
---|---|
230 } | 230 } |
231 | 231 |
232 $s->blocking(0); | 232 $s->blocking(0); |
233 while (IO::Select->new($s)->can_read(1.5)) { | 233 while (IO::Select->new($s)->can_read(1.5)) { |
234 my $n = $s->sysread($buf, 1024); | 234 my $n = $s->sysread($buf, 1024); |
235 last unless $n; | 235 unless ($n) { |
236 next if $s->errstr() == IO::Socket::SSL->SSL_WANT_READ; | |
237 last; | |
238 } | |
236 | 239 |
237 $h->{b} .= $buf; | 240 $h->{b} .= $buf; |
238 $h->{r} += $n; | 241 $h->{r} += $n; |
239 | 242 |
240 if ($h->{b} =~ /^(.*?\x0a)(.*)/ms) { | 243 if ($h->{b} =~ /^(.*?\x0a)(.*)/ms) { |