mirror of
https://git.mirrors.martin98.com/https://github.com/cyberman54/curl
synced 2025-08-22 02:49:07 +08:00
fix bug
This commit is contained in:
parent
78b1d4b623
commit
f459a802ec
@ -26,12 +26,16 @@ export const sendRequestWithRetry = (config: AxiosRequestConfig): void => {
|
||||
const numberOfRetry: number = Number(retryArr[0])
|
||||
const backoff: number = Number(retryArr[1])
|
||||
do{
|
||||
try{
|
||||
axios(config)
|
||||
.then(res => {
|
||||
exit = true
|
||||
setOutput(res)
|
||||
})
|
||||
.catch(err => {
|
||||
throw new Error(err)
|
||||
})
|
||||
}catch(err){
|
||||
countRetry += 1
|
||||
core.info(`retry: ${countRetry}`)
|
||||
if(countRetry <= numberOfRetry){
|
||||
@ -40,7 +44,7 @@ export const sendRequestWithRetry = (config: AxiosRequestConfig): void => {
|
||||
exit = true
|
||||
core.setFailed(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
}while(!exit)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user