From 96abf31ba752bb74592e1e8f2a43db61070c3f9c Mon Sep 17 00:00:00 2001 From: Jan Fuchs Date: Tue, 15 Mar 2016 11:07:26 +0100 Subject: Avoid crashing due to "Connection reset by peer" on SSL connection error Traceback (most recent call last): File "/opt/miniircd/bin/miniircd", line 797, in start File "/opt/miniircd/bin/miniircd", line 846, in loop File "/usr/lib/python2.7/ssl.py", line 891, in wrap_socket File "/usr/lib/python2.7/ssl.py", line 566, in __init__ File "/usr/lib/python2.7/ssl.py", line 788, in do_handshake error: [Errno 104] Connection reset by peer --- miniircd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniircd b/miniircd index 176c1d7..2b295e9 100755 --- a/miniircd +++ b/miniircd @@ -844,7 +844,7 @@ class Server(object): server_side=True, certfile=self.ssl_pem_file, keyfile=self.ssl_pem_file) - except self.ssl.SSLError as e: + except BaseException as e: self.print_error( "SSL error for connection from %s:%s: %s" % ( addr[0], addr[1], e)) -- cgit v1.2.3