Merge pull request #3290 from paochiang/fix_dedup_subscribers

This commit is contained in:
Chris Lu 2022-07-08 07:40:52 -07:00 committed by GitHub
commit b9518e06f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -263,6 +263,9 @@ func (fs *FilerServer) addClient(clientType string, clientAddress string, client
if clientId != 0 { if clientId != 0 {
fs.knownListenersLock.Lock() fs.knownListenersLock.Lock()
_, alreadyKnown = fs.knownListeners[clientId] _, alreadyKnown = fs.knownListeners[clientId]
if !alreadyKnown {
fs.knownListeners[clientId] = struct{}{}
}
fs.knownListenersLock.Unlock() fs.knownListenersLock.Unlock()
} }
return return