lib/elasticsearch/transport/transport/connections/connection.rb in elasticsearch-transport-6.1.0 vs lib/elasticsearch/transport/transport/connections/connection.rb in elasticsearch-transport-6.2.0

- old
+ new

@@ -21,10 +21,10 @@ # @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] + @host = arguments[:host].is_a?(Hash) ? Redacted.new(arguments[:host]) : arguments[:host] @connection = arguments[:connection] @options = arguments[:options] || {} @state_mutex = Mutex.new @options[:resurrect_timeout] ||= DEFAULT_RESURRECT_TIMEOUT