#8668 fix NPE in pipeline_reporter's worker_states method

Fixes #8669
This commit is contained in:
Armin 2017-11-14 20:33:22 +01:00 committed by Armin Braun
parent 2573082445
commit 1ce2cd9ad9

View file

@ -87,7 +87,8 @@ module LogStash; class PipelineReporter
def worker_states(batch_map) def worker_states(batch_map)
pipeline.worker_threads.map.with_index do |thread, idx| pipeline.worker_threads.map.with_index do |thread, idx|
status = thread.status || "dead" status = thread.status || "dead"
inflight_count = batch_map[thread] ? batch_map[thread].size : 0 batch = batch_map[thread]
inflight_count = batch ? batch.size : 0
{ {
:status => status, :status => status,
:alive => thread.alive?, :alive => thread.alive?,