Sha256: fea35c4c7bf070461d68d681b5596ce5fea195286bc4f1d498c236f36c0474f1

Contents?: true

Size: 738 Bytes

Versions: 68

Compression:

Stored size: 738 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)
    Puppet.deprecation_warning(_('Puppet::Network::HTTP::NoCachePool is deprecated.'))
    @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

68 entries across 68 versions & 1 rubygems

Version Path
puppet-6.29.0 lib/puppet/network/http/nocache_pool.rb
puppet-6.29.0-x86-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.29.0-x64-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.29.0-universal-darwin lib/puppet/network/http/nocache_pool.rb
puppet-6.28.0 lib/puppet/network/http/nocache_pool.rb
puppet-6.28.0-x86-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.28.0-x64-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.28.0-universal-darwin lib/puppet/network/http/nocache_pool.rb
puppet-6.27.0 lib/puppet/network/http/nocache_pool.rb
puppet-6.27.0-x86-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.27.0-x64-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.27.0-universal-darwin lib/puppet/network/http/nocache_pool.rb
puppet-6.26.0 lib/puppet/network/http/nocache_pool.rb
puppet-6.26.0-x86-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.26.0-x64-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.26.0-universal-darwin lib/puppet/network/http/nocache_pool.rb
puppet-6.25.1 lib/puppet/network/http/nocache_pool.rb
puppet-6.25.1-x86-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.25.1-x64-mingw32 lib/puppet/network/http/nocache_pool.rb
puppet-6.25.1-universal-darwin lib/puppet/network/http/nocache_pool.rb