From 4887c07ef3459030b440c7768789095ee5ca9b97 Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Wed, 16 Oct 2024 02:16:29 +0200 Subject: [PATCH] fix(virtualstream): Add console log for debugging backpressure feedback loop --- changelog.md | 5 +++++ ts/00_commitinfo_data.ts | 2 +- ts/classes.virtualstream.ts | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 60eb4ce..e072168 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,10 @@ # Changelog +## 2024-10-16 - 3.1.5 - fix(virtualstream) +Add console log for debugging backpressure feedback loop + +- Inserted a console log message to provide insight when waiting due to backpressure in the workOnQueue method. + ## 2024-10-16 - 3.1.4 - fix(VirtualStream) Corrected the logic for backpressure handling in response diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index ee8d532..1d892a1 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -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.' } diff --git a/ts/classes.virtualstream.ts b/ts/classes.virtualstream.ts index d3dfe98..53cecd8 100644 --- a/ts/classes.virtualstream.ts +++ b/ts/classes.virtualstream.ts @@ -180,6 +180,7 @@ export class VirtualStream 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(); }