Fix TLSProxy race by adding missing eval

Reviewed-by: Richard Levitte <levitte@openssl.org>
master
Viktor Dukhovni 7 years ago
parent f2b9c25721
commit 7ad5fb6267
  1. 14
      util/TLSProxy/Proxy.pm

@ -226,12 +226,14 @@ sub clientstart
do {
my $servaddr = $self->server_addr;
$servaddr =~ s/[\[\]]//g; # Remove [ and ]
$server_sock = $IP_factory->(
PeerAddr => $servaddr,
PeerPort => $self->server_port,
MultiHomed => 1,
Proto => 'tcp'
);
eval {
$server_sock = $IP_factory->(
PeerAddr => $servaddr,
PeerPort => $self->server_port,
MultiHomed => 1,
Proto => 'tcp'
);
};
$retry--;
if ($@ || !defined($server_sock)) {

Loading…
Cancel
Save