Fix SSLEOFError handler by moving into thread context

This commit is contained in:
XANTRONIX Development 2024-12-03 23:50:12 -05:00
parent 32281a3aa2
commit 9cb8b2e0e4

View file

@ -50,17 +50,18 @@ class Server():
return listener
def accept(self, listener):
try:
sock, addr = listener.accept()
sock, addr = listener.accept()
def spawn():
session = Session(self, sock)
def spawn():
session = Session(self, sock)
try:
session.handle()
except (ssl.SSLError, ssl.SSLEOFError) as e:
pass
thread = threading.Thread(target=spawn)
thread.start()
except ssl.SSLEOFError as e:
pass
thread = threading.Thread(target=spawn)
thread.start()
def run(self):
port = int(self.config['listen']['port'])