This commit is contained in:
Dmitry Krylov 2022-01-04 15:46:55 +03:00
parent a20b263b9e
commit 3b13a9f51d

View File

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