diff options
author | krishna <62157128+ksarabu1@users.noreply.github.com> | 2021-01-20 12:05:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 12:05:49 -0500 |
commit | e081024216bceaafc0d5022ce62f702667e2e9b3 (patch) | |
tree | b54880282651552c2847c89cf84c150c7f8c02e7 | |
parent | 89e0660371df940a4c15f5f6ab4c540bbd109d20 (diff) | |
download | kazoo-e081024216bceaafc0d5022ce62f702667e2e9b3.tar.gz |
feat(core): make DNS resolution error retriable (#631)
DNS resolution errors were previously not retriable, this commit allows it by changing the value returned when the DNS resolution fails.
-rw-r--r-- | kazoo/protocol/connection.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kazoo/protocol/connection.py b/kazoo/protocol/connection.py index 70de241..726f645 100644 --- a/kazoo/protocol/connection.py +++ b/kazoo/protocol/connection.py @@ -543,7 +543,7 @@ class ConnectionHandler(object): # Check for an empty hostlist, indicating none resolved if len(host_ports) == 0: - return STOP_CONNECTING + raise ForceRetryError('No host resolved. Reconnecting') for host, hostip, port in host_ports: if self.client._stopped.is_set(): |