only log and clear when actually needed

This commit is contained in:
Bruno Windels 2021-03-02 19:37:11 +01:00
parent e1821b1753
commit 8208464653

View File

@ -235,7 +235,7 @@ export class GapWriter {
nonOverlappingEvents, nonOverlappingEvents,
neighbourFragmentEntry neighbourFragmentEntry
} = await this._findOverlappingEvents(fragmentEntry, chunk, txn, log); } = await this._findOverlappingEvents(fragmentEntry, chunk, txn, log);
if (!neighbourFragmentEntry && nonOverlappingEvents.length === 0) { if (!neighbourFragmentEntry && nonOverlappingEvents.length === 0 && typeof end === "string") {
log.log("hit #160, clearing token", log.level.Warn); log.log("hit #160, clearing token", log.level.Warn);
end = null; end = null;
} }