Skip to content
This repository has been archived by the owner on Nov 13, 2023. It is now read-only.

Fix for request steam failure #1022

Merged
merged 5 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to the Imperative package will be documented in this file.

## Recent Changes

- BugFix: Fix for `AbstactRestClient` failing to return when streaming a large dataset or USS file [#1805](https://github.com/zowe/zowe-cli/issues/1805), [#1813](https://github.com/zowe/zowe-cli/issues/1813), and [#1824](https://github.com/zowe/zowe-cli/issues/1824)

## `5.18.2`

- BugFix: Fixed normalization on stream chunk boundaries [#1815](https://github.com/zowe/zowe-cli/issues/1815)
Expand Down
1 change: 1 addition & 0 deletions imperative
Submodule imperative added at 4d1224
4 changes: 4 additions & 0 deletions packages/rest/src/client/AbstractRestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,10 @@ export abstract class AbstractRestClient {
causeErrors: this.dataString,
source: "http"
}));
}else if (this.mResponseStream != null && this.mResponseStream.writableEnded) {
// This will correct any instances where the finished event does not get emitted
// even though the stream processing has ended.
this.mResolve(this.dataString);
} else if (this.mResponseStream != null && !this.mResponseStream.writableFinished) {
this.mResponseStream.on("finish", () => this.mResolve(this.dataString));
} else {
Expand Down
Loading