Sha256: 17d16981a3abc574219b28af4bec9ce05ed57622bd6300b91ecca3a3a7ca0a7e

Contents?: true

Size: 670 Bytes

Versions: 45

Compression:

Stored size: 670 Bytes

Contents

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

class 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 = Net::HTTP::Persistent::EPOCH
    @requests = 0
  end

  def ressl ssl_generation
    @ssl_generation = ssl_generation

    finish
  end

end

Version data entries

45 entries across 40 versions & 6 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/net-http-persistent-4.0.1/lib/net/http/persistent/connection.rb