From 43dd253c1247f8ebb695cab657648584aa8b9841 Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Thu, 23 Apr 2020 15:15:12 +0100 Subject: [PATCH] Fixed timeout in default scheduler no issue - the code didn't verify the existance of `timeoutInMS` before using it - this caused `requestTimeout` to be `undefined` - this commit adds the extra check so the fallback of 5000ms will be used --- core/server/adapters/scheduling/SchedulingDefault.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/adapters/scheduling/SchedulingDefault.js b/core/server/adapters/scheduling/SchedulingDefault.js index 50ce11c1f5..cf66fea19d 100644 --- a/core/server/adapters/scheduling/SchedulingDefault.js +++ b/core/server/adapters/scheduling/SchedulingDefault.js @@ -278,7 +278,7 @@ SchedulingDefault.prototype._pingUrl = function (object) { const httpMethod = object.extra ? object.extra.httpMethod : 'PUT'; const tries = object.tries || 0; - const requestTimeout = object.extra ? object.extra.timeoutInMS : 1000 * 5; + const requestTimeout = (object.extra && object.extra.timeoutInMS) ? object.extra.timeoutInMS : 1000 * 5; const maxTries = 30; const options = {