Fix SSLEOFError handler by moving into thread context
This commit is contained in:
parent
32281a3aa2
commit
9cb8b2e0e4
1 changed files with 9 additions and 8 deletions
|
@ -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'])
|
||||
|
|
Loading…
Add table
Reference in a new issue