From 741df23328bd6aa88187ff538b468a003fa6a199 Mon Sep 17 00:00:00 2001 From: Byron Adams Date: Fri, 23 Dec 2016 20:52:53 +1300 Subject: [PATCH] fix: Removing the abort trigger from httpExecutor (#1040) Closes #1039 --- nsis-auto-updater/src/electronHttpExecutor.ts | 11 ----------- src/util/nodeHttpExecutor.ts | 11 ----------- 2 files changed, 22 deletions(-) diff --git a/nsis-auto-updater/src/electronHttpExecutor.ts b/nsis-auto-updater/src/electronHttpExecutor.ts index 22d0ff87f9a..d4a44a8593d 100644 --- a/nsis-auto-updater/src/electronHttpExecutor.ts +++ b/nsis-auto-updater/src/electronHttpExecutor.ts @@ -117,17 +117,6 @@ export class ElectronHttpExecutor implements HttpExecutor { fileOut.on("finish", () => (fileOut.close)(callback)) }) .catch(callback) - - let ended = false - response.on("end", () => { - ended = true - }) - - response.on("close", () => { - if (!ended) { - callback(new Error("Request aborted")) - } - }) }) this.addTimeOutHandler(request, callback) request.on("error", callback) diff --git a/src/util/nodeHttpExecutor.ts b/src/util/nodeHttpExecutor.ts index bd13e0f3546..287887a6650 100644 --- a/src/util/nodeHttpExecutor.ts +++ b/src/util/nodeHttpExecutor.ts @@ -117,17 +117,6 @@ export class NodeHttpExecutor implements HttpExecutor { fileOut.on("finish", () => (fileOut.close)(callback)) }) .catch(callback) - - let ended = false - response.on("end", () => { - ended = true - }) - - response.on("close", () => { - if (!ended) { - callback(new Error("Request aborted")) - } - }) }) this.addTimeOutHandler(request, callback) request.on("error", callback)