diff --git a/dist/index.js b/dist/index.js index ccf71d986..b107969c7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -476,7 +476,8 @@ async function fetch(input_url, auth_token, redirect_count = 5) { const options = { hostname: url_object.hostname, path: url_object.pathname, - headers: headers + headers: headers, + agent: new https.Agent({ keepAlive: false }) }; const req = https.get(options, (res) => { if (res.statusCode === 200) { @@ -1969,7 +1970,7 @@ class OidcClient { .catch(error => { throw new Error(`Failed to get ID Token. \n Error Code : ${error.statusCode}\n - Error Message: ${error.result.message}`); + Error Message: ${error.message}`); }); const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; if (!id_token) { diff --git a/src/fetch.ts b/src/fetch.ts index 88b18a69f..b3f3c516a 100644 --- a/src/fetch.ts +++ b/src/fetch.ts @@ -26,7 +26,8 @@ export async function fetch( const options: https.RequestOptions = { hostname: url_object.hostname, path: url_object.pathname, - headers: headers + headers: headers, + agent: new https.Agent({keepAlive: false}) }; const req = https.get(options, (res: IncomingMessage) => { if (res.statusCode === 200) {