Ensure Session is made in new thread

This commit is contained in:
XANTRONIX Development 2024-11-26 17:01:49 -05:00
parent 01d2b34452
commit 731c516a3a

View file

@ -34,8 +34,11 @@ class Server():
while True:
sock, addr = listener.accept()
session = Session(self, sock)
thread = threading.Thread(target=session.handle)
def spawn():
session = Session(self, sock)
session.handle()
thread = threading.Thread(target=spawn)
thread.start()
listener.close()