Fix aof loading problem

This commit is contained in:
tidwall 2018-11-15 09:15:39 -07:00
parent 37afa7e92b
commit a0f3b0049f
1 changed files with 1 additions and 1 deletions
internal/server

View File

@ -54,7 +54,6 @@ func (server *Server) loadAOF() error {
var buf []byte
var args [][]byte
var packet [0xFFFF]byte
var msg Message
for {
n, err := server.aof.Read(packet[:])
if err != nil {
@ -81,6 +80,7 @@ func (server *Server) loadAOF() error {
break
}
if len(args) > 0 {
var msg Message
msg.Args = msg.Args[:0]
for _, arg := range args {
msg.Args = append(msg.Args, string(arg))