fix: avoid leading-boundary flush before complete boundary
This commit is contained in:
parent
872ff5fa36
commit
769bd98724
@ -106,6 +106,11 @@ export class LineTimeSliceBuffer {
|
|||||||
? boundaryIndex + 1
|
? boundaryIndex + 1
|
||||||
: buffer.length;
|
: buffer.length;
|
||||||
|
|
||||||
|
if (!canForceFlush && buffer.length > 0 && this.isBoundary(buffer.charAt(0)) && boundaryIndex < 0) {
|
||||||
|
this.scheduleTimer(key);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
const flushText = buffer.slice(0, flushIndex);
|
const flushText = buffer.slice(0, flushIndex);
|
||||||
const remainder = buffer.slice(flushIndex);
|
const remainder = buffer.slice(flushIndex);
|
||||||
this.buffers.set(key, remainder);
|
this.buffers.set(key, remainder);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user