mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-06 08:27:04 +08:00
Obtain a read lock on connection info before logging command.
This commit is contained in:
@@ -174,7 +174,9 @@ func (server *EchoVault) handleCommand(ctx context.Context, message []byte, conn
|
||||
}
|
||||
|
||||
if internal.IsWriteCommand(command, subCommand) && !replay {
|
||||
server.connInfo.mut.RLock()
|
||||
server.aofEngine.LogCommand(server.connInfo.tcpClients[conn].Database, message)
|
||||
server.connInfo.mut.RUnlock()
|
||||
}
|
||||
|
||||
server.stateMutationInProgress.Store(false)
|
||||
|
Reference in New Issue
Block a user