forked from blallo/Feedati
FIX dbprepare: wait_net_service exceptions
This commit is contained in:
parent
ab4d837936
commit
4f840d4c21
1 changed files with 3 additions and 1 deletions
|
@ -34,10 +34,12 @@ def wait_net_service(server, port, timeout=None):
|
|||
# this exception occurs only if timeout is set
|
||||
if timeout:
|
||||
return False
|
||||
except (ConnectionRefusedError, ConnectionAbortedError):
|
||||
pass
|
||||
except socket.error as err:
|
||||
# catch timeout exception from underlying network library
|
||||
# this one is different from socket.timeout
|
||||
if type(err.args) != tuple or err[0] != errno.ETIMEDOUT:
|
||||
if type(err.args) != tuple or err.errno != errno.ETIMEDOUT:
|
||||
raise
|
||||
else:
|
||||
s.close()
|
||||
|
|
Reference in a new issue