From 4e83e92156846a6cd7f90f8dde31f5e54209cc59 Mon Sep 17 00:00:00 2001 From: liubaojiang <1838095916@qq.com> Date: Fri, 8 Jul 2022 20:27:25 +0800 Subject: [PATCH] add subscriber clientId if it is the first time --- weed/server/filer_grpc_server_sub_meta.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/weed/server/filer_grpc_server_sub_meta.go b/weed/server/filer_grpc_server_sub_meta.go index da710234b..745379e7c 100644 --- a/weed/server/filer_grpc_server_sub_meta.go +++ b/weed/server/filer_grpc_server_sub_meta.go @@ -263,6 +263,9 @@ func (fs *FilerServer) addClient(clientType string, clientAddress string, client if clientId != 0 { fs.knownListenersLock.Lock() _, alreadyKnown = fs.knownListeners[clientId] + if !alreadyKnown { + fs.knownListeners[clientId] = struct{}{} + } fs.knownListenersLock.Unlock() } return