Browse Source

lib/model: Clarify fileInfoBatch.flushIfFull criteria

Jakob Borg 6 years ago
parent
commit
9da3273eb8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/model/model.go

+ 1 - 1
lib/model/model.go

@@ -2867,7 +2867,7 @@ func (b *fileInfoBatch) append(f protocol.FileInfo) {
 }
 
 func (b *fileInfoBatch) flushIfFull() error {
-	if len(b.infos) == maxBatchSizeFiles || b.size > maxBatchSizeBytes {
+	if len(b.infos) >= maxBatchSizeFiles || b.size >= maxBatchSizeBytes {
 		return b.flush()
 	}
 	return nil