class PersistentConnectionAdapter::PersistentHTTP
basically just reconnect if you get an EOFError
Public Instance Methods
request(req, body = nil, &block)
Also aliased as: request_without_retry
Alias for: request_with_retry
request_with_retry(req, body = nil, &block)
click to toggle source
# File lib/resthome/httparty/persistent_connection_adapter.rb, line 5 def request_with_retry(req, body = nil, &block) begin request_without_retry req, body, &block rescue EOFError => e # means the server closed the connection most likely @socket.close if @socket and not @socket.closed? connect request_without_retry req, body, &block end end
Also aliased as: request