lib/elasticsearch/transport/transport/connections/connection.rb in elasticsearch-transport-7.15.0 vs lib/elasticsearch/transport/transport/connections/connection.rb in elasticsearch-transport-7.16.0
- old
+ new
@@ -31,19 +31,21 @@
#
class Connection
DEFAULT_RESURRECT_TIMEOUT = 60
attr_reader :host, :connection, :options, :failures, :dead_since
+ attr_accessor :verified
# @option arguments [Hash] :host Host information (example: `{host: 'localhost', port: 9200}`)
# @option arguments [Object] :connection The transport-specific physical connection or "session"
# @option arguments [Hash] :options Options (usually passed in from transport)
#
def initialize(arguments={})
@host = arguments[:host].is_a?(Hash) ? Redacted.new(arguments[:host]) : arguments[:host]
@connection = arguments[:connection]
@options = arguments[:options] || {}
+ @verified = false
@state_mutex = Mutex.new
@options[:resurrect_timeout] ||= DEFAULT_RESURRECT_TIMEOUT
@dead = false
@failures = 0
@@ -151,10 +153,9 @@
#
def to_s
"<#{self.class.name} host: #{host} (#{dead? ? 'dead since ' + dead_since.to_s : 'alive'})>"
end
end
-
end
end
end
end