From dca97e9bfdfbb62b9a4f664ee901a826bc338ad7 Mon Sep 17 00:00:00 2001 From: Viktor Dukhovni Date: Sat, 20 Feb 2016 18:17:28 -0500 Subject: [PATCH] Work-around for proxy->s_server retry logic Reviewed-by: Richard Levitte --- util/TLSProxy/Proxy.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util/TLSProxy/Proxy.pm b/util/TLSProxy/Proxy.pm index 7d21f4e83d..96e368189e 100644 --- a/util/TLSProxy/Proxy.pm +++ b/util/TLSProxy/Proxy.pm @@ -269,7 +269,9 @@ sub clientstart ); $retry--; - if (!$server_sock) { + if ($@ || !defined($server_sock)) { + $server_sock->close() if defined($server_sock); + undef $server_sock; if ($retry) { #Sleep for a short while select(undef, undef, undef, 0.1); -- 2.25.1