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))
|
||||
self.soc = _try_with_backoff(
|
||||
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")
|
||||
|
||||
|
@ -72,7 +72,7 @@ class SocketWrapper:
|
|||
LOG.info("Server Binding to {}:{}".format(self.host, self.port))
|
||||
self.soc = _try_with_backoff(
|
||||
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")
|
||||
|
||||
|
|
Loading…
Reference in New Issue