lib/redis_failover/client.rb in nogara-redis_failover-0.9.7.4 vs lib/redis_failover/client.rb in nogara-redis_failover-1.0.0
- old
+ new
@@ -319,9 +319,13 @@
nodes
rescue Zookeeper::Exceptions::InheritedConnectionError => ex
logger.debug { "Caught #{ex.class} '#{ex.message}' - reopening ZK client" }
@zk.reopen
retry
+ rescue *ZK_ERRORS => ex
+ logger.warn { "Caught #{ex.class} '#{ex.message}' - retrying" }
+ sleep(RETRY_WAIT_TIME)
+ retry
end
# Builds new Redis clients for the specified nodes.
#
# @param [Array<String>] nodes the array of redis host:port pairs