summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Frei <freisim93@gmail.com>2024-03-11 07:30:21 +0100
committerGitHub <noreply@github.com>2024-03-11 07:30:21 +0100
commit8c8167a4ab3130c69bebcd53e0c11934fbc8e939 (patch)
tree655edaa71e71c11845ed7e31fa1f3fa514f22f3f
parent73cc5553b623dbbe71b75ddd0add9b89dca6714a (diff)
lib/model: Don't bump seq on error in index handler (#9459)v1.27.5-rc.1
-rw-r--r--lib/model/indexhandler.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/model/indexhandler.go b/lib/model/indexhandler.go
index efa2754a9..e8572789b 100644
--- a/lib/model/indexhandler.go
+++ b/lib/model/indexhandler.go
@@ -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,
@@ -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 {