add subscriber clientId if it is the first time

This commit is contained in:
liubaojiang committed 2022-07-08 20:27:25 +08:00
1 parent 22e05a2942
commit 4e83e92156
1 file changed
+3
@@ -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