From bf68a15943f57e9824062ec894344d96ade04420 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Tue, 23 Apr 2024 10:37:15 +0200 Subject: [PATCH] Make sure "clientsMap" is updated so all clients are closed on shutdown. --- grpc_client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/grpc_client.go b/grpc_client.go index fccdd97..33d70ae 100644 --- a/grpc_client.go +++ b/grpc_client.go @@ -490,6 +490,7 @@ func (c *GrpcClients) loadTargetsStatic(config *goconf.ConfigFile, fromReload bo entry, found := clientsMap[target] if !found { entry = &grpcClientsList{} + clientsMap[target] = entry } entry.clients = append(entry.clients, client) clients = append(clients, client)