From c8a6c175f201d8c6425f71d9dbfcfaa4ed498360 Mon Sep 17 00:00:00 2001 From: Icarus9913 Date: Mon, 12 Jun 2023 10:48:24 +0800 Subject: [PATCH] fix IP GC scan all running unhealthy Signed-off-by: Icarus9913 --- pkg/gcmanager/scanAll_IPPool.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/gcmanager/scanAll_IPPool.go b/pkg/gcmanager/scanAll_IPPool.go index 5621bd5c85..219e50ceba 100644 --- a/pkg/gcmanager/scanAll_IPPool.go +++ b/pkg/gcmanager/scanAll_IPPool.go @@ -31,8 +31,10 @@ func (s *SpiderGC) monitorGCSignal(ctx context.Context) { timer := time.NewTimer(d) defer timer.Stop() - logger.Debug("initial scan all for cluster firstly") - s.gcSignal <- struct{}{} + go func() { + logger.Debug("initial scan all for cluster firstly") + s.gcSignal <- struct{}{} + }() for { select {