Handle timeouts while creating a connection

This commit is contained in:
Juhani Krekelä 2023-10-26 22:10:30 +03:00
parent c23f48c329
commit 9f0dacca0d
1 changed files with 1 additions and 1 deletions

View File

@ -314,7 +314,7 @@ class ServerThread(threading.Thread):
self.logging_channel.send((logmessage_types.internal, internal_submessage_types.server, address))
try:
self.server_socket = socket.create_connection(address)
except (ConnectionRefusedError, socket.gaierror):
except (ConnectionRefusedError, socket.gaierror, TimeoutError):
# Tell controller we failed
self.logging_channel.send((logmessage_types.internal, internal_submessage_types.error, "Can't connect to %s:%s" % address))