ultravisor 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -215,7 +215,9 @@ module.exports =
|
|
|
215
215
|
// Already exists — fine
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
let tmpTimeoutMs = parseInt(pResolvedSettings.TimeoutMs, 10) || 300000;
|
|
219
|
+
|
|
220
|
+
pTask.log.info(`File Transfer: downloading ${tmpSourceURL} → ${tmpFilename} (timeout ${Math.round(tmpTimeoutMs / 1000)}s)`);
|
|
219
221
|
|
|
220
222
|
// Validate URL before attempting request
|
|
221
223
|
if (!tmpSourceURL.startsWith('http://') && !tmpSourceURL.startsWith('https://'))
|
|
@@ -269,10 +271,10 @@ module.exports =
|
|
|
269
271
|
});
|
|
270
272
|
});
|
|
271
273
|
|
|
272
|
-
// Set
|
|
273
|
-
tmpRequest.setTimeout(
|
|
274
|
+
// Set timeout on the request (configurable via TimeoutMs setting, default 5 min)
|
|
275
|
+
tmpRequest.setTimeout(tmpTimeoutMs, function ()
|
|
274
276
|
{
|
|
275
|
-
tmpRequest.destroy(new Error(
|
|
277
|
+
tmpRequest.destroy(new Error(`File Transfer: download timed out after ${Math.round(tmpTimeoutMs / 1000)} seconds`));
|
|
276
278
|
});
|
|
277
279
|
}
|
|
278
280
|
},
|