Permalink
Browse files

cleanup

  • Loading branch information...
ryanlecompte committed Apr 19, 2012
1 parent 95a2b2d commit 3744a93bcc293ac21b34c70dd3f85c19f4e2392e
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/redis_failover/zk_client.rb
@@ -4,6 +4,7 @@ module RedisFailover
class ZkClient
include Util
+ TIMEOUT = 2
MAX_RECONNECTS = 3
RECONNECTABLE_ERRORS = [
ZookeeperExceptions::ZookeeperException::SessionExpired,
@@ -65,7 +66,8 @@ def perform_with_reconnect
@on_session_expiration.call if @on_session_expiration
build_client
@on_session_recovered.call if @on_session_recovered
- sleep(2) && retry
+ sleep(TIMEOUT)
+ retry
end
raise

0 comments on commit 3744a93

Please sign in to comment.