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

Commit

Permalink
Merge pull request #1022 from zowe/fix-for-request-steam-failure
Browse files Browse the repository at this point in the history
Fix for request steam failure
  • Loading branch information
KevinLoesch1 authored Oct 19, 2023
2 parents 58d9117 + dd1ff96 commit 2725328
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
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

0 comments on commit 2725328

Please sign in to comment.