fix(buffer): avoid stalled session events

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-02-17 06:01:56 +01:00
parent 4bf55fe840
commit 14468a1004

View File

@@ -101,9 +101,11 @@ for i, sessionId in ipairs(sessionIds) do
result[resultIndex] = { sessionId = sessionId, events = events }
resultIndex = resultIndex + 1
totalEvents = totalEvents + #events
if totalEvents >= batchSize then
break
end
end
-- Only check if we should break AFTER processing the entire session
if totalEvents >= batchSize then
break
end
end