Skip to content

Commit 1c12b74

Browse files
author
Amoki
committed
remove time out
1 parent b27052a commit 1c12b74

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/helpers/hydrater.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,12 @@ module.exports = function(hydraterFunction, logger, errLogger) {
4646
*/
4747
function downloadFile(cb) {
4848
if(task.file_path) {
49-
var timeout = setTimeout(function() {
50-
cb(new restify.BadGatewayError('Error when downloading file ' + task.file_path + ': Unable to deal with streams'));
51-
}, 20 * 1000);
52-
5349
// Download the file
5450
var stream = fs.createWriteStream(path);
5551

5652
// Store error if statusCode !== 200
5753
var err;
5854
stream.on("finish", function() {
59-
clearTimeout(timeout);
6055
cb(err);
6156
});
6257

@@ -71,7 +66,6 @@ module.exports = function(hydraterFunction, logger, errLogger) {
7166
this.abort();
7267
}
7368
});
74-
7569
req.pipe(stream);
7670
}
7771
else {

0 commit comments

Comments
 (0)