Fix YLT freezing the queue when an incorrect gzip header is sent on a file

This commit is contained in:
Gaël Métais
2015-07-22 15:48:45 +02:00
parent 7779efedf1
commit e342a88f7d
3 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -6,6 +6,7 @@ var zlib = require('zlib');
var GzipCompressor = function() {
function compressFile(entry) {
debug('Entering compressFile');
return gzipUncompressedFile(entry)
.then(gzipOptimizedFile);
@@ -41,7 +42,7 @@ var GzipCompressor = function() {
}
});
} else {
debug('Compression not needed');
deferred.resolve(entry);
}
@@ -73,6 +74,7 @@ var GzipCompressor = function() {
}
});
} else {
debug('Compressing optimized file not needed');
deferred.resolve(entry);
}