Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3f1750c

Browse files
Fix destroying response in update again
I added another reject that doesn't destroy the response.
1 parent 7b2752a commit 3f1750c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/node/update.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,13 @@ export class UpdateProvider {
111111

112112
if (response.statusCode >= 300) {
113113
++redirects
114+
response.destroy()
114115
if (redirects > maxRedirects) {
115-
response.destroy()
116116
return reject(new Error("reached max redirects"))
117117
}
118118
if (!response.headers.location) {
119119
return reject(new Error("received redirect with no location header"))
120120
}
121-
response.destroy()
122121
return request(url.resolve(uri, response.headers.location))
123122
}
124123

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /