From 898296d20d53075ddc189cb626ba3cd5872bd189 Mon Sep 17 00:00:00 2001 From: Nicolas PLANEL Date: Mon, 30 Jul 2018 18:13:55 +0200 Subject: [PATCH] agent: print each analyzer connection --- agent/agent.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/agent.go b/agent/agent.go index c1d8600ab4..66ca8fdec0 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -111,7 +111,8 @@ func (a *Agent) GetStatus() interface{} { } analyzers := make(map[string]AnalyzerConnStatus) - for id, status := range a.analyzerClientPool.GetStatus() { + for _, status := range a.analyzerClientPool.GetStatus() { + id := fmt.Sprintf("%s:%d", status.Addr, status.Port) analyzers[id] = AnalyzerConnStatus{ WSConnStatus: status, IsMaster: status.Addr == masterAddr && status.Port == masterPort,