Browse Source

fs: fix fd leak in ReadStream.destroy()

PR-URL: https://github.com/iojs/io.js/pull/56
Reviewed-By: Rod Vagg <rod@vagg.org>

See PR for long discussion
v1.8.0-commit
Alex Kocharin 11 years ago
committed by Rod Vagg
parent
commit
497fd72e21
  1. 4
      lib/fs.js

4
lib/fs.js

@ -1668,9 +1668,7 @@ ReadStream.prototype.destroy = function() {
if (this.destroyed)
return;
this.destroyed = true;
if (util.isNumber(this.fd))
this.close();
this.close();
};

Loading…
Cancel
Save