fix missing lock

This commit is contained in:
tidwall 2023-05-21 08:29:30 -07:00
parent add9873fef
commit 0144ca6883
1 changed files with 1 additions and 0 deletions

View File

@ -302,6 +302,7 @@ func (s *Server) followStep(host string, port int, followc int) error {
if !caughtUp { if !caughtUp {
if aofsz >= int(aofSize) { if aofsz >= int(aofSize) {
caughtUp = true caughtUp = true
s.mu.Lock()
s.flushAOF(false) s.flushAOF(false)
s.fcup = true s.fcup = true
s.fcuponce = true s.fcuponce = true