lib/elasticsearch/transport/transport/base.rb in elasticsearch-transport-7.0.0 vs lib/elasticsearch/transport/transport/base.rb in elasticsearch-transport-7.1.0

- old
+ new

@@ -282,10 +282,10 @@ # Raise an exception so we can catch it for `retry_on_status` __raise_transport_error(response) if response.status.to_i >= 300 && @retry_on_status.include?(response.status.to_i) rescue Elasticsearch::Transport::Transport::ServerError => e - if @retry_on_status.include?(response.status) + if response && @retry_on_status.include?(response.status) log_warn "[#{e.class}] Attempt #{tries} to get response from #{url}" if tries <= max_retries retry else log_fatal "[#{e.class}] Cannot get response from #{url} after #{tries} tries" \ No newline at end of file