mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-05 00:02:38 -04:00
removing resolver_ios cache from pool (did not have accurate values, not really useful since selector avoid doubler registries already)
This commit is contained in:
parent
a8830681df
commit
921d1f6371
@ -163,4 +163,7 @@ Style/SlicingWithRange:
|
|||||||
Performance/StringIdentifierArgument:
|
Performance/StringIdentifierArgument:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'test/support/websocket_test_plugin.rb'
|
- 'test/support/websocket_test_plugin.rb'
|
||||||
- 'test/support/requests/plugins/upgrade.rb'
|
- 'test/support/requests/plugins/upgrade.rb'
|
||||||
|
|
||||||
|
Style/Lambda:
|
||||||
|
Enabled: false
|
||||||
|
@ -14,7 +14,6 @@ module HTTPX
|
|||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@resolvers = {}
|
@resolvers = {}
|
||||||
@_resolver_ios = {}
|
|
||||||
@timers = Timers.new
|
@timers = Timers.new
|
||||||
@selector = Selector.new
|
@selector = Selector.new
|
||||||
@connections = []
|
@connections = []
|
||||||
@ -111,7 +110,7 @@ module HTTPX
|
|||||||
resolver << connection
|
resolver << connection
|
||||||
return if resolver.empty?
|
return if resolver.empty?
|
||||||
|
|
||||||
@_resolver_ios[resolver] ||= select_connection(resolver)
|
select_connection(resolver)
|
||||||
end
|
end
|
||||||
|
|
||||||
def on_resolver_connection(connection)
|
def on_resolver_connection(connection)
|
||||||
@ -143,7 +142,6 @@ module HTTPX
|
|||||||
@resolvers.delete(resolver_type)
|
@resolvers.delete(resolver_type)
|
||||||
|
|
||||||
deselect_connection(resolver)
|
deselect_connection(resolver)
|
||||||
@_resolver_ios.delete(resolver)
|
|
||||||
resolver.close unless resolver.closed?
|
resolver.close unless resolver.closed?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
20
sig/pool.rbs
20
sig/pool.rbs
@ -1,14 +1,20 @@
|
|||||||
module HTTPX
|
module HTTPX
|
||||||
class Pool
|
class Pool
|
||||||
|
@resolvers: Hash[Class, Resolver::Resolver]
|
||||||
|
@timers: Timers
|
||||||
|
@selector: Selector
|
||||||
|
@connections: Array[Connection]
|
||||||
|
@connected_connections: Integer
|
||||||
|
|
||||||
def empty?: () -> void
|
def empty?: () -> void
|
||||||
|
|
||||||
def next_tick: () -> void
|
def next_tick: () -> void
|
||||||
|
|
||||||
def close: (*Array[Connection]) -> void
|
def close: (?Array[Connection] connections) -> void
|
||||||
|
|
||||||
def init_connection: (Connection, Options) -> void
|
def init_connection: (Connection connection, Options options) -> void
|
||||||
|
|
||||||
def find_connection: (generic_uri, Options) -> Connection?
|
def find_connection: (URI::Generic uri, Options options) -> Connection?
|
||||||
|
|
||||||
def deactivate: (*Array[Connection]) -> void
|
def deactivate: (*Array[Connection]) -> void
|
||||||
|
|
||||||
@ -28,13 +34,13 @@ module HTTPX
|
|||||||
|
|
||||||
def unregister_connection: (Connection) -> void
|
def unregister_connection: (Connection) -> void
|
||||||
|
|
||||||
def select_connection: (resolver | Connection connection) -> void
|
def select_connection: (Resolver::Resolver | Connection connection) -> void
|
||||||
|
|
||||||
def deselect_connection: (resolver | Connection connection) -> void
|
def deselect_connection: (Resolver::Resolver | Connection connection) -> void
|
||||||
|
|
||||||
def coalesce_connections: (Connection, Connection) -> void
|
def coalesce_connections: (Connection coalescable, Connection coalescing) -> void
|
||||||
|
|
||||||
def next_timeout: () -> Numeric?
|
def next_timeout: () -> (Integer | Float | nil)
|
||||||
|
|
||||||
def find_resolver_for: (Connection) -> Resolver::Resolver
|
def find_resolver_for: (Connection) -> Resolver::Resolver
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user