+10 seconds for Abort signal (#4053)

* Debug only

* Remove debug
This commit is contained in:
Louis Lam 2023-11-22 16:03:03 +08:00 committed by GitHub
parent 33ce0ef02c
commit bf58838b89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -483,7 +483,7 @@ class Monitor extends BeanModel {
validateStatus: (status) => {
return checkStatusCode(status, this.getAcceptedStatuscodes());
},
signal: axiosAbortSignal(this.timeout * 1000),
signal: axiosAbortSignal((this.timeout + 10) * 1000),
};
if (bodyValue) {

View file

@ -1141,7 +1141,6 @@ module.exports.axiosAbortSignal = (timeoutMs) => {
// v16-: AbortSignal.timeout is not supported
try {
const abortController = new AbortController();
setTimeout(() => abortController.abort(), timeoutMs);
return abortController.signal;