Skip to content

Commit

Permalink
fix: Removing the abort trigger from httpExecutor (#1040)
Browse files Browse the repository at this point in the history
Closes #1039
  • Loading branch information
badams authored and develar committed Dec 23, 2016
1 parent dcf3dbb commit 741df23
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions nsis-auto-updater/src/electronHttpExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,6 @@ export class ElectronHttpExecutor implements HttpExecutor {
fileOut.on("finish", () => (<any>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)
Expand Down
11 changes: 0 additions & 11 deletions src/util/nodeHttpExecutor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,6 @@ export class NodeHttpExecutor implements HttpExecutor {
fileOut.on("finish", () => (<any>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)
Expand Down

0 comments on commit 741df23

Please sign in to comment.