Do actually handle errors, close socket
This commit is contained in:
parent
ab02e49807
commit
4d953d477c
1 changed files with 5 additions and 2 deletions
|
|
@ -41,8 +41,11 @@ class Server():
|
||||||
return
|
return
|
||||||
|
|
||||||
def spawn():
|
def spawn():
|
||||||
|
try:
|
||||||
session = Session(self, sock)
|
session = Session(self, sock)
|
||||||
session.handle()
|
session.handle()
|
||||||
|
except:
|
||||||
|
sock.close()
|
||||||
|
|
||||||
thread = threading.Thread(target=spawn)
|
thread = threading.Thread(target=spawn)
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue