From 3b13a9f51d62b41d68c9cde5e4df910d696aaedb Mon Sep 17 00:00:00 2001 From: Dmitry Krylov Date: Tue, 4 Jan 2022 15:46:55 +0300 Subject: [PATCH] Fixed --- worker/worker.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/worker/worker.go b/worker/worker.go index f00fb9b..9964eb4 100644 --- a/worker/worker.go +++ b/worker/worker.go @@ -231,7 +231,9 @@ func (worker *Worker) Stop() { // Wait for completeness serving func (worker *Worker) WaitRunning() { // Wait for all the running activities has stopped - worker.active.Wait() + if worker.stopped { + worker.active.Wait() + } } // Close connection and exit main loop