Give the addons a lot more time to initiate a connection
This commit is contained in:
@@ -1240,7 +1240,7 @@ async function pipeRequestToFile(url, filename) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const writeStream = fs.createWriteStream(filename);
|
||||
const request = http.request(url, { method: 'POST' }); // ClientRequest
|
||||
request.setTimeout(60000, () => request.destroy(new Error('Request timedout'))); // connect OR post-connect idle timeout
|
||||
request.setTimeout(600000, () => request.destroy(new Error('Request timedout'))); // connect OR post-connect idle timeout
|
||||
|
||||
request.on('error', (error) => reject(new BoxError(BoxError.NETWORK_ERROR, `Could not pipe ${url} to ${filename}: ${error.message}`))); // network error, dns error
|
||||
request.on('response', (response) => {
|
||||
|
||||
Reference in New Issue
Block a user