Method: Gem::Request::ConnectionPools#pool_for
- Defined in:
- lib/rubygems/request/connection_pools.rb
#pool_for(uri) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rubygems/request/connection_pools.rb', line 18 def pool_for(uri) http_args = net_http_args(uri, @proxy_uri) key = http_args + [https?(uri)] @pool_mutex.synchronize do @pools[key] ||= if https? uri Gem::Request::HTTPSPool.new(http_args, @cert_files, @proxy_uri, @pool_size) else Gem::Request::HTTPPool.new(http_args, @cert_files, @proxy_uri, @pool_size) end end end |