lib/elasticsearch/transport/transport/base.rb in elasticsearch-transport-1.0.0.rc1 vs lib/elasticsearch/transport/transport/base.rb in elasticsearch-transport-1.0.0.rc2
- old
+ new
@@ -175,10 +175,16 @@
tries = 0
begin
tries += 1
connection = get_connection or raise Error.new("Cannot get new connection from pool.")
+
+ if connection.connection.respond_to?(:params) && connection.connection.params.respond_to?(:to_hash)
+ params = connection.connection.params.merge(params.to_hash)
+ end
+
url = connection.full_url(path, params)
+
response = block.call(connection, url)
connection.healthy! if connection.failures > 0
rescue *host_unreachable_exceptions => e