fix that bug
This commit is contained in:
parent
b8aa7dd1e8
commit
fb9257917c
|
@ -64,7 +64,7 @@ class SocketWrapper:
|
||||||
LOG.debug("Connecting to {}:{}".format(self.host, self.port))
|
LOG.debug("Connecting to {}:{}".format(self.host, self.port))
|
||||||
self.soc = _try_with_backoff(
|
self.soc = _try_with_backoff(
|
||||||
lambda: socket.create_connection((self.host, self.port)),
|
lambda: socket.create_connection((self.host, self.port)),
|
||||||
lambda e: e is OSError and e.errno == 111,
|
lambda e: isinstance(e, OSError) and e.errno == 111,
|
||||||
)
|
)
|
||||||
LOG.info("Socket Connected")
|
LOG.info("Socket Connected")
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class SocketWrapper:
|
||||||
LOG.info("Server Binding to {}:{}".format(self.host, self.port))
|
LOG.info("Server Binding to {}:{}".format(self.host, self.port))
|
||||||
self.soc = _try_with_backoff(
|
self.soc = _try_with_backoff(
|
||||||
lambda: socket_create_server((self.host, self.port)),
|
lambda: socket_create_server((self.host, self.port)),
|
||||||
lambda e: e is OSError and e.errno == 98,
|
lambda e: isinstance(e, OSError) and e.errno == 98,
|
||||||
)
|
)
|
||||||
LOG.info("Server Bound")
|
LOG.info("Server Bound")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue