From a0f3b0049f6077c960e7d57c7d87b3737b1c355e Mon Sep 17 00:00:00 2001 From: tidwall Date: Thu, 15 Nov 2018 09:15:39 -0700 Subject: [PATCH] Fix aof loading problem --- internal/server/aof.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/server/aof.go b/internal/server/aof.go index 3d038347..737c0900 100644 --- a/internal/server/aof.go +++ b/internal/server/aof.go @@ -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))