mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-10 00:01:27 -04:00
passing timers to connection, thereby giving them the possibility to set timer events
This commit is contained in:
parent
926ad27011
commit
7fb548db6b
@ -46,6 +46,8 @@ module HTTPX
|
||||
|
||||
attr_reader :origin, :state, :pending, :options
|
||||
|
||||
attr_writer :timers
|
||||
|
||||
def initialize(type, uri, options)
|
||||
@type = type
|
||||
@origins = [uri.origin]
|
||||
|
@ -51,6 +51,7 @@ module HTTPX
|
||||
|
||||
def init_connection(connection, _options)
|
||||
resolve_connection(connection)
|
||||
connection.timers = @timers
|
||||
connection.on(:open) do
|
||||
@connected_connections += 1
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user