diff --git a/lib/xenu_nntp/server.py b/lib/xenu_nntp/server.py index 6a45f10..c735d4e 100644 --- a/lib/xenu_nntp/server.py +++ b/lib/xenu_nntp/server.py @@ -1,5 +1,4 @@ import re -import enum import threading import socket import selectors @@ -38,7 +37,7 @@ class Server(): try: sock, addr = listener.accept() - except ssl.SSLError as e: + except ssl.SSLError: return def spawn(): @@ -46,12 +45,12 @@ class Server(): try: session.handle() + + thread = threading.Thread(target=spawn) + thread.start() except (ssl.SSLEOFError, ssl.SSLError): pass - thread = threading.Thread(target=spawn) - thread.start() - def run(self): hosts = re.split(r'\s*,\s*', self.config.get('listen', 'host')) port = int(self.config.get('listen', 'port'))