Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

fs.readFile: Emit 'close' if we don't expect a close later

This fixes a regression introduced by 40b7302
  • Loading branch information...
isaacs committed Apr 7, 2012
1 parent 08e2e57 commit 45b772d8cb3fb2c3a4a07f30056879bc054ee627
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/fs.js
@@ -88,6 +88,9 @@ fs.readFile = function(path, encoding_) {
readStream.on('error', function(er) {
error = er;
readStream.destroy();
if (!readStream.fd) {
readStream.emit('close');
}
});

readStream.on('close', function() {

0 comments on commit 45b772d

Please sign in to comment.
You can’t perform that action at this time.