fix(virtualstream): Add console log for debugging backpressure feedback loop

This commit is contained in:
2024-10-16 02:16:29 +02:00
parent c0fdc8a1d4
commit 4887c07ef3
3 changed files with 7 additions and 1 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@api.global/typedrequest',
version: '3.1.4',
version: '3.1.5',
description: 'A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.'
}

View File

@ -180,6 +180,7 @@ export class VirtualStream<T = Uint8Array> implements plugins.typedRequestInterf
while (this.sendBackpressuredArray.data.length > 0 || otherSideHasNext) {
if (otherSideIsBackpressured) {
while (otherSideIsBackpressured) {
console.log('waiting for feedback because of backpressure...');
await plugins.smartdelay.delayFor(50);
await getFeedback();
}