Browse Source

Fix panic (#5654)

pull/5655/head
Gaspare Iengo 7 months ago
committed by GitHub
parent
commit
dc6b750424
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      weed/server/master_grpc_server.go

4
weed/server/master_grpc_server.go

@ -373,8 +373,10 @@ func (ms *MasterServer) deleteClient(clientName string) {
glog.V(0).Infof("- client %v", clientName) glog.V(0).Infof("- client %v", clientName)
ms.clientChansLock.Lock() ms.clientChansLock.Lock()
// close message chan, so that the KeepConnected go routine can exit // close message chan, so that the KeepConnected go routine can exit
close(ms.clientChans[clientName])
if clientChan, ok := ms.clientChans[clientName]; ok {
close(clientChan)
delete(ms.clientChans, clientName) delete(ms.clientChans, clientName)
}
ms.clientChansLock.Unlock() ms.clientChansLock.Unlock()
} }

Loading…
Cancel
Save