From f4c9f1209e36451a3c4baead38cb2973a9d6025f Mon Sep 17 00:00:00 2001 From: Peter Bacsko Date: Tue, 2 Apr 2024 01:08:38 +0200 Subject: [PATCH] Review --- pkg/dispatcher/dispatcher.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/dispatcher/dispatcher.go b/pkg/dispatcher/dispatcher.go index 66bc2b7a3..51e46ec69 100644 --- a/pkg/dispatcher/dispatcher.go +++ b/pkg/dispatcher/dispatcher.go @@ -261,11 +261,10 @@ func Stop() { close(getDispatcher().stopChan) stopWait := make(chan struct{}) - defer close(stopWait) go func() { + defer close(stopWait) getDispatcher().stopped.Wait() - stopWait <- struct{}{} }() // wait until the main event loop stops properly