Permalink
Browse files

Ensure free_client() method is called on connection retries.

We need to explicitly call free_client within the retry loop, as the ensure section is only called once, on resque block exit.
  • Loading branch information...
1 parent f718c29 commit 317af76ee5778979c5c66218f7a2c4398b48844d @arohter arohter committed Oct 14, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/redis_failover/client.rb
@@ -241,6 +241,7 @@ def dispatch(method, *args, &block)
if tries < @max_retries
tries += 1
+ free_client
build_clients
sleep(RETRY_WAIT_TIME)
retry

0 comments on commit 317af76

Please sign in to comment.