diff --git a/src/connectors/http.ts b/src/connectors/http.ts index 0d8ff9e..cc3243e 100644 --- a/src/connectors/http.ts +++ b/src/connectors/http.ts @@ -103,7 +103,7 @@ export const startHttpStreamWriter: WriterConstructor = ( const requestConfig = new URL(config.endpoint); const push = async (item: string | Buffer): Promise => { - await new Promise(async (res) => { + await new Promise(async (resolve) => { const options = { hostname: requestConfig.hostname, path: requestConfig.path, @@ -114,8 +114,7 @@ export const startHttpStreamWriter: WriterConstructor = ( const cb = (response: IncomingMessage): void => { response.on("data", () => {}); response.on("end", () => { - console.log("Incoming message ended"); - res(null); + resolve(null); }); };