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
pull/419/head
Alex Kocharin 2014-08-15 00:29:56 +04:00 committed by Rod Vagg
parent 8b09ae76f1
commit 497fd72e21
1 changed files with 1 additions and 3 deletions

View File

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