Skip to content

Commit

Permalink
dup.end!
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenplusplus committed Nov 6, 2014
1 parent 5e9bfb1 commit 97e4762
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/storage/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ File.prototype.createReadStream = function() {
onAuthorized: function(err, authorizedReqOpts) {
if (err) {
dup.emit('error', err);
dup.end();
return;
}
dup.setReadable(request(authorizedReqOpts));
Expand All @@ -214,6 +215,7 @@ File.prototype.createReadStream = function() {
this.getMetadata(function(err, metadata) {
if (err) {
dup.emit('error', err);
dup.end();
return;
}
createAuthorizedReq(metadata.mediaLink);
Expand Down

0 comments on commit 97e4762

Please sign in to comment.