We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a39e22b commit 4b56385Copy full SHA for 4b56385
src/node/update.ts
@@ -106,12 +106,13 @@ export class UpdateProvider {
106
const httpx = uri.startsWith("https") ? https : http
107
const client = httpx.get(uri, { headers: { "User-Agent": "code-server" } }, (response) => {
108
if (!response.statusCode || response.statusCode < 200 || response.statusCode >= 400) {
109
+ response.destroy()
110
return reject(new Error(`${uri}: ${response.statusCode || "500"}`))
111
}
112
113
if (response.statusCode >= 300) {
- ++redirects
114
response.destroy()
115
+ ++redirects
116
if (redirects > maxRedirects) {
117
return reject(new Error("reached max redirects"))
118
0 commit comments