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

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

View File

@ -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

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();
}