Don't swallow up every SSL error

This commit is contained in:
XANTRONIX 2025-04-09 10:23:18 -04:00
parent 9ebe7933cb
commit ab02e49807

View file

@ -37,19 +37,15 @@ class Server():
try: try:
sock, addr = listener.accept() sock, addr = listener.accept()
except ssl.SSLError: except:
return return
def spawn(): def spawn():
session = Session(self, sock) session = Session(self, sock)
try:
session.handle() session.handle()
thread = threading.Thread(target=spawn) thread = threading.Thread(target=spawn)
thread.start() thread.start()
except (ssl.SSLEOFError, ssl.SSLError):
pass
def run(self): def run(self):
hosts = re.split(r'\s*,\s*', self.config.get('listen', 'host')) hosts = re.split(r'\s*,\s*', self.config.get('listen', 'host'))