Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
dcf014bf95 | |||
ef5aa9ece3 |
@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## 2024-10-16 - 3.1.9 - fix(VirtualStream)
|
||||
Ensure writable streams are correctly closed asynchronously to prevent potential sync issues.
|
||||
|
||||
- Updated VirtualStream to use 'await' when closing writable streams, ensuring proper asynchronous handling.
|
||||
|
||||
## 2024-10-16 - 3.1.8 - fix(VirtualStream)
|
||||
Fix stream closing behavior to correctly handle closing bits
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@api.global/typedrequest",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"private": false,
|
||||
"description": "A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.",
|
||||
"main": "dist_ts/index.js",
|
||||
|
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@api.global/typedrequest',
|
||||
version: '3.1.8',
|
||||
version: '3.1.9',
|
||||
description: 'A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.'
|
||||
}
|
||||
|
@ -404,7 +404,7 @@ export class VirtualStream<T = Uint8Array> implements plugins.typedRequestInterf
|
||||
while(this.keepAlive || this.receiveBackpressuredArray.checkHasItems()) {
|
||||
const value = await this.fetchData();
|
||||
if (value === closingBit) {
|
||||
writableStreamArg.close();
|
||||
await writableStreamArg.close();
|
||||
break;
|
||||
}
|
||||
await writer.write(value);
|
||||
|
Reference in New Issue
Block a user