From e3c7820eb11544018aecb5a814e001bedf93e3bf Mon Sep 17 00:00:00 2001 From: Andrew Kofink Date: Tue, 14 May 2019 21:35:52 -0400 Subject: [PATCH] Handle stopping a nil worker_thread client (#72) --- lib/prometheus_exporter/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/prometheus_exporter/client.rb b/lib/prometheus_exporter/client.rb index 049aa2e..9fa5855 100644 --- a/lib/prometheus_exporter/client.rb +++ b/lib/prometheus_exporter/client.rb @@ -124,7 +124,7 @@ module PrometheusExporter @mutex.synchronize do wait_for_empty_queue_with_timeout(wait_timeout_seconds) @worker_thread&.kill - while @worker_thread.alive? + while @worker_thread&.alive? sleep 0.001 end @worker_thread = nil