lib/datasift.rb in datasift-3.1.2 vs lib/datasift.rb in datasift-3.1.3
- old
+ new
@@ -154,11 +154,11 @@
:method => method,
:open_timeout => open_timeout,
:timeout => timeout,
:payload => payload,
:url => url,
- :ssl_version => 'TLSv1'
+ :ssl_version => OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:ssl_version]
)
begin
response = RestClient::Request.execute options
if response != nil && response.length > 0
@@ -321,9 +321,10 @@
end
def self.retry_connect(config, connection, on_delete, on_error, on_open, on_close, message = '', use_closed = false)
config[:retry_timeout] = config[:retry_timeout] == 0 || config[:retry_timeout] == nil ? 10 : config[:retry_timeout] * 2
connection.retry_timeout = config[:retry_timeout]
+
if config[:retry_timeout] > config[:max_retry_time]
if use_closed && on_close != nil
on_close.call(connection, message)
else
on_error.call(connection, ReconnectTimeoutError.new("Connecting to DataSift has failed, re-connection was attempted but