Skip to content

Commit

Permalink
fs: fix fd leak in ReadStream.destroy()
Browse files Browse the repository at this point in the history
PR-URL: #56
Reviewed-By: Rod Vagg <rod@vagg.org>

See PR for long discussion
  • Loading branch information
rlidwka authored and rvagg committed Jan 27, 2015
1 parent 8b09ae7 commit 497fd72
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1668,9 +1668,7 @@ ReadStream.prototype.destroy = function() {
if (this.destroyed)
return;
this.destroyed = true;

if (util.isNumber(this.fd))
this.close();
this.close();
};


Expand Down

0 comments on commit 497fd72

Please sign in to comment.