lib/logstash/inputs/elasticsearch.rb in logstash-input-elasticsearch-1.0.2 vs lib/logstash/inputs/elasticsearch.rb in logstash-input-elasticsearch-2.0.0

- old
+ new

@@ -154,10 +154,10 @@ else # not a scan, process the response r['hits']['hits'].each { |hit| push_hit(hit, output_queue) } has_hits = r['hits']['hits'].any? end - while has_hits do + while has_hits && !stop? r = process_next_scroll(output_queue, r['_scroll_id']) has_hits = r['has_hits'] end end # def run