Run initiation under try/except
Ensures that connection is closed if errors occur here.
This commit is contained in:
parent
40265ebb3e
commit
0a7d73bc83
1 changed files with 2 additions and 3 deletions
|
|
@ -147,10 +147,9 @@ class ClientConnection(threading.Thread):
|
|||
|
||||
|
||||
def run(self):
|
||||
self.initiate_client_and_server_connections()
|
||||
_logger.debug('Initiated')
|
||||
try:
|
||||
_logger.debug('Using select to wait for data')
|
||||
self.initiate_client_and_server_connections()
|
||||
_logger.debug('Initiated')
|
||||
while not self.stopped:
|
||||
timeout = 0
|
||||
sockets = [self.server_socket, self.socket]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue