From 51d990c2c5176fd5fd4945ee402dd81a950970a6 Mon Sep 17 00:00:00 2001 From: "dongwan.kang" Date: Thu, 14 Nov 2024 14:33:21 +0900 Subject: [PATCH] [#105] fix test fail --- agent.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/agent.go b/agent.go index 914bb11..b2a2852 100644 --- a/agent.go +++ b/agent.go @@ -254,12 +254,14 @@ func (agent *agent) Shutdown() { agent.cmdGrpc.close() } - agent.pingTicker.Stop() - agent.pingDone <- true - agent.statTicker.Stop() - agent.statDone <- true - agent.urlStatTicker.Stop() - agent.urlStatDone <- true + if !agent.config.offGrpc { + agent.pingTicker.Stop() + agent.pingDone <- true + agent.statTicker.Stop() + agent.statDone <- true + agent.urlStatTicker.Stop() + agent.urlStatDone <- true + } agent.workerWg.Wait() if agent.agentGrpc != nil {