Skip to content

Commit

Permalink
+10 seconds for Abort signal (#4053)
Browse files Browse the repository at this point in the history
* Debug only

* Remove debug
  • Loading branch information
louislam authored Nov 22, 2023
1 parent 33ce0ef commit bf58838
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion server/model/monitor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion server/util-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bf58838

Please sign in to comment.