diff --git a/internal/server/follow.go b/internal/server/follow.go index a70c2204..e61759f9 100644 --- a/internal/server/follow.go +++ b/internal/server/follow.go @@ -302,6 +302,7 @@ func (s *Server) followStep(host string, port int, followc int) error { if !caughtUp { if aofsz >= int(aofSize) { caughtUp = true + s.mu.Lock() s.flushAOF(false) s.fcup = true s.fcuponce = true