mirror of
https://github.com/hellodigua/ChatLab.git
synced 2026-10-26 02:04:37 +08:00
fix(sync): fold initial empty-page cursor before entering retry loop
When the first small response is empty with hasMore=false and carries sync.nextSince, the file was deleted before that cursor value was saved. If retry pages also omit nextSince, nextPullSince stays at the old lastPullAt and the next poll re-fetches the same completed tail window. Fold sync0.nextSince into nextPullSince immediately after cleanupTempFile, before the retry loop, matching the existing pattern for retry pages. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
f69f419192
commit
f8079d9031
1 file changed
+1
@@ -255,6 +255,7 @@ export class PullEngine {
|
||||
if (stat.size < 1024) {
|
||||
if (!fileContainsMessages(tempFile) && sync0?.hasMore === false) {
|
||||
cleanupTempFile(tempFile)
|
||||
if (sync0?.nextSince !== undefined) nextPullSince = Math.max(nextPullSince, sync0.nextSince)
|
||||
const retryDelays = [2000, 3000, 5000]
|
||||
let retrySuccess = false
|
||||
let retryHasMore = false
|
||||
|
||||
Reference in new issue
Block a user