Handle stopping a nil worker_thread client (#72)

This commit is contained in:
Andrew Kofink 2019-05-14 21:35:52 -04:00 committed by Sam
parent 38357d1757
commit e3c7820eb1
1 changed files with 1 additions and 1 deletions

View File

@ -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