Skip to content

Commit

Permalink
lib/model: Don't bump seq on error in index handler (#9459)
Browse files Browse the repository at this point in the history
  • Loading branch information
imsodin committed Mar 11, 2024
1 parent 73cc555 commit 8c8167a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/model/indexhandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,9 @@ func (s *indexHandler) sendIndexTo(ctx context.Context, fset *db.FileSet) error
return err
}

err = batch.Flush()
if err := batch.Flush(); err != nil {
return err
}

// Use the sequence of the snapshot we iterated as a starting point for the
// next run. Previously we used the sequence of the last file we sent,
Expand All @@ -302,7 +304,7 @@ func (s *indexHandler) sendIndexTo(ctx context.Context, fset *db.FileSet) error
// reverted). No point trying to send nothing again.
s.prevSequence = snap.Sequence(protocol.LocalDeviceID)

return err
return nil
}

func (s *indexHandler) receive(fs []protocol.FileInfo, update bool, op string) error {
Expand Down

0 comments on commit 8c8167a

Please sign in to comment.