Skip to content

Commit 78ddc48

Browse files
Todd PalinoTodd Palino
authored andcommitted
Add a warning if a host does not resolve
1 parent 0d9ac9d commit 78ddc48

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

kazoo/protocol/connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ def _expand_client_hosts(self):
485485
try:
486486
for rhost in socket.getaddrinfo(host.strip(), port, 0, 0, socket.IPPROTO_TCP):
487487
host_ports.append((rhost[4][0], rhost[4][1]))
488-
except socket.gaierror:
488+
except socket.gaierror as e:
489489
# Skip hosts that don't resolve
490+
self.logger.warning("Cannot resolve %s: %s", host.strip(), e)
490491
pass
491492
if self.client.randomize_hosts:
492493
random.shuffle(host_ports)

0 commit comments

Comments
 (0)