Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4305)
while( (!(TLSProxy::Message->end)
|| (defined $self->sessionfile()
&& (-s $self->sessionfile()) == 0))
- && $ctr < 10
- && (@ready = $sel->can_read(1))) {
+ && $ctr < 10) {
+ if (!(@ready = $sel->can_read(1))) {
+ $ctr++;
+ next;
+ }
foreach my $hand (@ready) {
if ($hand == $server_sock) {
$server_sock->sysread($indata, 16384) or goto END;
$server_sock->syswrite($indata);
$ctr = 0;
} else {
- $ctr++
+ die "Unexpected handle";
}
}
}