avoid race conditions for OnPeerUpdate (#3525)

https://github.com/seaweedfs/seaweedfs/issues/3524
This commit is contained in:
Konstantin Lebedev authored and GitHub committed 2022-08-26 10:18:49 -07:00
1 parent 4f7a1f67cd
commit e90ab4ac60
4 files changed
+14 -4

No files matched your search

+1 -1
View File
@@ -116,7 +116,7 @@ func NewMasterServer(r *mux.Router, option *MasterOption, peers map[string]pb.Se
}
ms.boundedLeaderChan = make(chan int, 16)
ms.MasterClient.OnPeerUpdate = ms.OnPeerUpdate
ms.MasterClient.SetOnPeerUpdateFn(ms.OnPeerUpdate)
seq := ms.createSequencer(option)
if nil == seq {