Skip to content

Commit

Permalink
implement feedback (renamve res to resolve)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajuvercr committed Mar 25, 2024
1 parent beab0ff commit 7425bc6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/connectors/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const startHttpStreamWriter: WriterConstructor<HttpWriterConfig> = (
const requestConfig = <https.RequestOptions>new URL(config.endpoint);

const push = async (item: string | Buffer): Promise<void> => {
await new Promise(async (res) => {
await new Promise(async (resolve) => {
const options = {
hostname: requestConfig.hostname,
path: requestConfig.path,
Expand All @@ -114,8 +114,7 @@ export const startHttpStreamWriter: WriterConstructor<HttpWriterConfig> = (
const cb = (response: IncomingMessage): void => {
response.on("data", () => {});
response.on("end", () => {
console.log("Incoming message ended");
res(null);
resolve(null);
});
};

Expand Down

0 comments on commit 7425bc6

Please sign in to comment.