Class: HTTPkit::Client::TimeoutsHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/httpkit/client/timeouts_handler.rb

Overview

See Also:

  • EM.heartbeat_interval

Instance Method Summary collapse

Instance Method Details

#setup(config, _, connection) ⇒ Object


6
7
8
9
10
11
12
# File 'lib/httpkit/client/timeouts_handler.rb', line 6

def setup(config, _, connection)
  @config = config
  @connection = connection

  @connection.comm_inactivity_timeout = @config[:timeout]         ||= 2.0
  @connection.pending_connect_timeout = @config[:connect_timeout] ||= 2.0
end