lib/dhc/interceptors/default_timeout.rb in dhc-2.4.0 vs lib/dhc/interceptors/default_timeout.rb in dhc-3.0.0
- old
+ new
@@ -7,10 +7,10 @@
CONNECTTIMEOUT = 2 # seconds
TIMEOUT = 15 # seconds
def before_init
- request_options = (request.options || {})
+ request_options = request.options || {}
request_options[:timeout] ||= timeout || TIMEOUT
request_options[:connecttimeout] ||= connecttimeout || CONNECTTIMEOUT
end
end