tcatch wrap_socket timeouts - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 4df599794046f4aee7438ac7e5368de470a4de0f (DIR) parent 0fd108079d95862bc0ce5454ae992ef5eb9ed3d9 (HTM) Author: ThomasV <thomasv@electrum.org> Date: Sat, 26 Aug 2017 06:52:43 +0200 catch wrap_socket timeouts Diffstat: M lib/interface.py | 4 ++++ 1 file changed, 4 insertions(+), 0 deletions(-) --- (DIR) diff --git a/lib/interface.py b/lib/interface.py t@@ -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 t@@ -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