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

Commit

Permalink
Fix for AbstractRestClient not returning
Browse files Browse the repository at this point in the history
Signed-off-by: KevinLoesch1 <kevin.loesch@broadcom.com>
  • Loading branch information
KevinLoesch1 committed Oct 18, 2023
1 parent 4d1224d commit f32d27f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
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 f32d27f

Please sign in to comment.