commit 4df599794046f4aee7438ac7e5368de470a4de0f
parent 0fd108079d95862bc0ce5454ae992ef5eb9ed3d9
Author: ThomasV <thomasv@electrum.org>
Date: Sat, 26 Aug 2017 06:52:43 +0200
catch wrap_socket timeouts
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/lib/interface.py b/lib/interface.py
@@ -136,6 +136,8 @@ class TcpConnection(threading.Thread, util.PrintError):
# try with CA first
try:
s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1_1, cert_reqs=ssl.CERT_REQUIRED, ca_certs=ca_path, do_handshake_on_connect=True)
+ except socket.timeout:
+ return
except ssl.SSLError as e:
print_error(e)
s = None
@@ -149,6 +151,8 @@ class TcpConnection(threading.Thread, util.PrintError):
return
try:
s = ssl.wrap_socket(s, ssl_version=ssl.PROTOCOL_TLSv1_1, cert_reqs=ssl.CERT_NONE, ca_certs=None)
+ except socket.timeout:
+ return
except ssl.SSLError as e:
self.print_error("SSL error retrieving SSL certificate:", e)
return