forked from DebaucheryLibrarian/traxxx
Accounting for missing options in http utility timeout function.
This commit is contained in:
parent
41d06f7e9d
commit
a0be8f0aa3
|
@ -142,7 +142,7 @@ function getTimeout(options, url) {
|
|||
return new Promise((resolve, reject, onCancel) => {
|
||||
const timeoutId = setTimeout(() => {
|
||||
reject(new Error(`URL ${url} timed out`));
|
||||
}, (options.timeout || defaultOptions.timeout) + 10000);
|
||||
}, (options?.timeout || defaultOptions.timeout) + 10000);
|
||||
|
||||
onCancel(() => clearTimeout(timeoutId));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue