Helper methods extended onto Net::HTTPSession objects opend by the connection pool. @api private
@return [Time,nil]
# File lib/seahorse/client/net_http/connection_pool.rb, line 311 def initialize(http) super(http) @http = http end
# File lib/seahorse/client/net_http/connection_pool.rb, line 319 def __getobj__ @http end
# File lib/seahorse/client/net_http/connection_pool.rb, line 323 def __setobj__(obj) @http = obj end
Attempts to close/finish the session without raising an error.
# File lib/seahorse/client/net_http/connection_pool.rb, line 334 def finish @http.finish rescue IOError nil end
Sends the request and tracks that this session has been used.
# File lib/seahorse/client/net_http/connection_pool.rb, line 328 def request(*args, &block) @last_used = Time.now @http.request(*args, &block) end