From b1fcb62ff7c468a783636e9e9dff77577500fc8c Mon Sep 17 00:00:00 2001 From: Salimane Adjao Moustapha Date: Mon, 21 Oct 2013 21:36:51 +0200 Subject: [PATCH] don't use the original options in client_opts, it's being used for the pool --- lib/sidekiq/redis_connection.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/sidekiq/redis_connection.rb b/lib/sidekiq/redis_connection.rb index b8e4ebf7..35832bec 100644 --- a/lib/sidekiq/redis_connection.rb +++ b/lib/sidekiq/redis_connection.rb @@ -37,18 +37,19 @@ module Sidekiq end def client_opts(options) - if options[:namespace] - options.delete(:namespace) + opts = options.dup + if opts[:namespace] + opts.delete(:namespace) end - if options[:network_timeout] - options[:timeout] = options[:network_timeout] - options.delete(:network_timeout) + if opts[:network_timeout] + opts[:timeout] = opts[:network_timeout] + opts.delete(:network_timeout) end - options[:driver] = options[:driver] || 'ruby' + opts[:driver] = opts[:driver] || 'ruby' - options + opts end def log_info(options)