+10 seconds for Abort signal (#4053)

* Debug only

* Remove debug
pull/4084/head
Louis Lam 1 year ago committed by GitHub
parent 33ce0ef02c
commit bf58838b89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

Loading…
Cancel
Save