Sha256: 93968f64f38db1e17cb3282cfc205592eb74c5f37d6fb5cf7d2ac9bacd47b2eb

Contents?: true

Size: 712 Bytes

Versions: 273

Compression:

Stored size: 712 Bytes

Contents

##
# A Net::HTTP connection wrapper that holds extra information for managing the
# connection's lifetime.

class Bundler::Persistent::Net::HTTP::Persistent::Connection # :nodoc:

  attr_accessor :http

  attr_accessor :last_use

  attr_accessor :requests

  attr_accessor :ssl_generation

  def initialize http_class, http_args, ssl_generation
    @http           = http_class.new(*http_args)
    @ssl_generation = ssl_generation

    reset
  end

  def finish
    @http.finish
  rescue IOError
  ensure
    reset
  end

  def reset
    @last_use = Bundler::Persistent::Net::HTTP::Persistent::EPOCH
    @requests = 0
  end

  def ressl ssl_generation
    @ssl_generation = ssl_generation

    finish
  end

end

Version data entries

273 entries across 273 versions & 6 rubygems

Version Path
direct7-0.0.18 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
direct7-0.0.17 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
direct7-0.0.16 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
direct7-0.0.13 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
direct7-0.0.12 vendor/bundle/ruby/2.7.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/bundler-2.4.21/lib/bundler/vendor/net-http-persistent/lib/net/http/persistent/connection.rb