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
This commit is contained in:
Daniel Lockyer 2020-04-23 15:15:12 +01:00
parent 97830fda41
commit 43dd253c12
1 changed files with 1 additions and 1 deletions

View File

@ -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 = {