Skip to content

Commit 8e2a65c

Browse files
authored
fix microsoft#249863 - Timeout manifest request (microsoft#250601)
1 parent 2a88b7d commit 8e2a65c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/vs/platform/extensionManagement/common/extensionGalleryService.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const SEARCH_ACTIVITY_HEADER_NAME = 'X-Market-Search-Activity-Id';
3838
const ACTIVITY_HEADER_NAME = 'Activityid';
3939
const SERVER_HEADER_NAME = 'Server';
4040
const END_END_ID_HEADER_NAME = 'X-Vss-E2eid';
41+
const REQUEST_TIME_OUT = 10_000;
4142

4243
interface IRawGalleryExtensionFile {
4344
readonly assetType: string;
@@ -1455,7 +1456,7 @@ export abstract class AbstractExtensionGalleryService implements IExtensionGalle
14551456
type: 'GET',
14561457
url: uri.toString(true),
14571458
headers,
1458-
timeout: 10000 /*10s*/
1459+
timeout: REQUEST_TIME_OUT
14591460
}, token);
14601461

14611462
if (context.res.statusCode === 404) {
@@ -1735,7 +1736,7 @@ export abstract class AbstractExtensionGalleryService implements IExtensionGalle
17351736

17361737
const url = asset.uri;
17371738
const fallbackUrl = asset.fallbackUri;
1738-
const firstOptions = { ...options, url };
1739+
const firstOptions = { ...options, url, timeout: REQUEST_TIME_OUT };
17391740

17401741
let context;
17411742
try {
@@ -1781,7 +1782,7 @@ export abstract class AbstractExtensionGalleryService implements IExtensionGalle
17811782
endToEndId: this.getHeaderValue(context?.res.headers, END_END_ID_HEADER_NAME),
17821783
});
17831784

1784-
const fallbackOptions = { ...options, url: fallbackUrl };
1785+
const fallbackOptions = { ...options, url: fallbackUrl, timeout: REQUEST_TIME_OUT };
17851786
return this.requestService.request(fallbackOptions, token);
17861787
}
17871788
}
@@ -1798,7 +1799,7 @@ export abstract class AbstractExtensionGalleryService implements IExtensionGalle
17981799
const context = await this.requestService.request({
17991800
type: 'GET',
18001801
url: this.extensionsControlUrl,
1801-
timeout: 10000 /*10s*/
1802+
timeout: REQUEST_TIME_OUT
18021803
}, CancellationToken.None);
18031804

18041805
if (context.res.statusCode !== 200) {

0 commit comments

Comments
 (0)