From 7ad5fb6267e9da1634998bf2eccaa753f443fa83 Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Wed, 11 May 2016 18:01:41 -0400 Subject: [PATCH] Fix TLSProxy race by adding missing eval Reviewed-by: Richard Levitte --- util/TLSProxy/Proxy.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/util/TLSProxy/Proxy.pm b/util/TLSProxy/Proxy.pm index aafd902bca..950fd90749 100644 --- a/util/TLSProxy/Proxy.pm +++ b/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)) { -- 2.25.1