Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit fef12be

Browse files
committed
SIGN-8057 Set default timeout on agent
1 parent d17a6a8 commit fef12be

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • actions/submit-signing-request

actions/submit-signing-request/task.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,18 +221,18 @@ export class Task {
221221

222222
private configureAxios(): void {
223223

224+
const timeoutMs = this.helperInputOutput.serviceUnavailableTimeoutInSeconds * 1000
225+
224226
// set user agent
225227
axios.defaults.headers.common['User-Agent'] = this.userAgent;
226228
axios.defaults.httpsAgent = new Agent({
227-
keepAlive: true
229+
keepAlive: true,
230+
timeout: timeoutMs
228231
})
229232

230233
// set token for all outgoing requests
231234
axios.defaults.headers.common.Authorization = `Bearer ${this.helperInputOutput.signPathApiToken}`
232235

233-
const timeoutMs = this.helperInputOutput.serviceUnavailableTimeoutInSeconds * 1000
234-
axios.defaults.timeout = timeoutMs;
235-
236236
// log all outgoing requests
237237
axios.interceptors.request.use(request => {
238238
core.debug(`Sending request: ${request.method?.toUpperCase()} ${request.url}`);

0 commit comments

Comments
 (0)