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
|
||||
|
||||
def spawn():
|
||||
session = Session(self, sock)
|
||||
session.handle()
|
||||
try:
|
||||
session = Session(self, sock)
|
||||
session.handle()
|
||||
except:
|
||||
sock.close()
|
||||
|
||||
thread = threading.Thread(target=spawn)
|
||||
thread.start()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue