Configure link fetch to use prefetchTimeout
This change modifies the `fetch` function in `link.js` to use the new `prefetchTimeout` config setting introduced in the previous commit. This allows configuring the length of the timeout. I've added a comment here to indicate milliseconds are the unit in use, since otherwise that would no longer be obvious from the code without looking at the default value (which could change).
This commit is contained in:
parent
3202b79990
commit
3796485217
@ -390,7 +390,7 @@ function fetch(uri, headers) {
|
|||||||
try {
|
try {
|
||||||
const gotStream = got.stream(uri, {
|
const gotStream = got.stream(uri, {
|
||||||
retry: 0,
|
retry: 0,
|
||||||
timeout: 5000,
|
timeout: Helper.config.prefetchTimeout, // milliseconds
|
||||||
headers: getRequestHeaders(headers),
|
headers: getRequestHeaders(headers),
|
||||||
https: {
|
https: {
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user