mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-08 18:20:49 +08:00
bug fix: unlock master status when no slaves
This commit is contained in:
@@ -373,6 +373,7 @@ const maxBacklogSize = 10 * 1024 * 1024 // 10MB
|
|||||||
func (server *Server) masterCron() {
|
func (server *Server) masterCron() {
|
||||||
server.masterStatus.mu.Lock()
|
server.masterStatus.mu.Lock()
|
||||||
if len(server.masterStatus.slaveMap) == 0 { // no slaves, do nothing
|
if len(server.masterStatus.slaveMap) == 0 { // no slaves, do nothing
|
||||||
|
server.masterStatus.mu.Unlock()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if server.masterStatus.bgSaveState == bgSaveFinish {
|
if server.masterStatus.bgSaveState == bgSaveFinish {
|
||||||
|
Reference in New Issue
Block a user