Skip to content

Commit 463b145

Browse files
Add KeepAlive option for Azure-arm-rest (#318)
- Since node19 http.GlobalAgent has timeout for 5 sec which might be too short for Azure REST API By addeding keppALive request option we construct own agent with longer timeout Ref doc: https://nodejs.org/docs/latest/api/http.html#httpglobalagent
1 parent b498f99 commit 463b145

File tree

3 files changed

+134
-34
lines changed

3 files changed

+134
-34
lines changed

common-npm-packages/azure-arm-rest/package-lock.json

Lines changed: 131 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common-npm-packages/azure-arm-rest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"jsonwebtoken": "^8.5.1",
2626
"node-fetch": "^2.6.7",
2727
"q": "1.5.1",
28-
"typed-rest-client": "1.8.4",
28+
"typed-rest-client": "^1.8.6",
2929
"xml2js": "0.6.2"
3030
},
3131
"devDependencies": {

common-npm-packages/azure-arm-rest/webClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ var requestOptions: httpInterfaces.IRequestOptions = proxyUrl ? {
1313
proxyBypassHosts: tl.getVariable("agent.proxybypasslist") ? JSON.parse(tl.getVariable("agent.proxybypasslist")) : null
1414
}
1515
} : {
16-
allowRedirects: false
16+
allowRedirects: false,
17+
keepAlive: true
1718
};
1819

1920
let ignoreSslErrors: string = tl.getVariable("VSTS_ARM_REST_IGNORE_SSL_ERRORS");

0 commit comments

Comments
 (0)