bug fix: unlock master status when no slaves

This commit is contained in:
finley
2023-03-14 01:14:35 +08:00
parent 1c47a0322c
commit 48a146cb08

View File

@@ -373,6 +373,7 @@ const maxBacklogSize = 10 * 1024 * 1024 // 10MB
func (server *Server) masterCron() {
server.masterStatus.mu.Lock()
if len(server.masterStatus.slaveMap) == 0 { // no slaves, do nothing
server.masterStatus.mu.Unlock()
return
}
if server.masterStatus.bgSaveState == bgSaveFinish {