Skip to content

Commit 741df23

Browse files
badamsdevelar
authored andcommitted
fix: Removing the abort trigger from httpExecutor (#1040)
Closes #1039
1 parent dcf3dbb commit 741df23

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

nsis-auto-updater/src/electronHttpExecutor.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,6 @@ export class ElectronHttpExecutor implements HttpExecutor {
117117
fileOut.on("finish", () => (<any>fileOut.close)(callback))
118118
})
119119
.catch(callback)
120-
121-
let ended = false
122-
response.on("end", () => {
123-
ended = true
124-
})
125-
126-
response.on("close", () => {
127-
if (!ended) {
128-
callback(new Error("Request aborted"))
129-
}
130-
})
131120
})
132121
this.addTimeOutHandler(request, callback)
133122
request.on("error", callback)

src/util/nodeHttpExecutor.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,6 @@ export class NodeHttpExecutor implements HttpExecutor {
117117
fileOut.on("finish", () => (<any>fileOut.close)(callback))
118118
})
119119
.catch(callback)
120-
121-
let ended = false
122-
response.on("end", () => {
123-
ended = true
124-
})
125-
126-
response.on("close", () => {
127-
if (!ended) {
128-
callback(new Error("Request aborted"))
129-
}
130-
})
131120
})
132121
this.addTimeOutHandler(request, callback)
133122
request.on("error", callback)

0 commit comments

Comments
 (0)