Sha256: 851fe12e564ed45f24f8fc2beda9fedd399e7f2e0763602db0fec0a518c6ebcd
Contents?: true
Size: 651 Bytes
Versions: 12
Compression:
Stored size: 651 Bytes
Contents
# A pool that does not cache HTTP connections. # # @api private class Puppet::Network::HTTP::NoCachePool < Puppet::Network::HTTP::BasePool def initialize(factory = Puppet::Network::HTTP::Factory.new) @factory = factory end # Yields a <tt>Net::HTTP</tt> connection. # # @yieldparam http [Net::HTTP] An HTTP connection def with_connection(site, verifier, &block) http = @factory.create_connection(site) start(site, verifier, http) begin yield http ensure return unless http.started? Puppet.debug("Closing connection for #{site}") http.finish end end def close # do nothing end end
Version data entries
12 entries across 12 versions & 1 rubygems