diff --git a/lib/storage.js b/lib/storage.js index 286b6efd4..3243d0b5d 100644 --- a/lib/storage.js +++ b/lib/storage.js @@ -266,6 +266,9 @@ Storage.prototype.get_tarball = function(name, filename) { savestream.abort(); stream.emit('error', err); }); + rstream2.on('end', function() { + savestream.done(); + }); // XXX: check, what would happen if client disconnects? rstream2.pipe(stream);