Skip to content

Commit a37e5ae

Browse files
committed
Configure :connect_timeout from _parse_options
1 parent f8ed909 commit a37e5ae

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/redis/client.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,12 @@ def _parse_options(options)
393393
end
394394

395395
options[:timeout] = options[:timeout].to_f
396+
options[:connect_timeout] = if options[:connect_timeout]
397+
options[:connect_timeout].to_f
398+
else
399+
options[:timeout]
400+
end
401+
396402
options[:db] = options[:db].to_i
397403
options[:driver] = _parse_driver(options[:driver]) || Connection.drivers.last
398404

0 commit comments

Comments
 (0)