|
@@ -34,10 +34,12 @@ def wait_net_service(server, port, timeout=None):
|
|
# this exception occurs only if timeout is set
|
|
# this exception occurs only if timeout is set
|
|
if timeout:
|
|
if timeout:
|
|
return False
|
|
return False
|
|
|
|
+ except (ConnectionRefusedError, ConnectionAbortedError):
|
|
|
|
+ pass
|
|
except socket.error as err:
|
|
except socket.error as err:
|
|
# catch timeout exception from underlying network library
|
|
# catch timeout exception from underlying network library
|
|
# this one is different from socket.timeout
|
|
# 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
|
|
raise
|
|
else:
|
|
else:
|
|
s.close()
|
|
s.close()
|