Permalink
Browse files

Close file handle when user wants to stop reading

The documentation states:

    If the callback returns false, reading will stop and the file will be closed.
  • Loading branch information...
1 parent 7dae91b commit 58283de2a4ee375fe09c61f9deb85b7d50d39e58 @mattcg mattcg committed Jan 11, 2014
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/line_reader.js
View
@@ -138,6 +138,7 @@
newRead();
} else {
finish();
+ reader.close();
}
}
@@ -152,6 +153,7 @@
newRead();
} else {
finish();
+ reader.close();
}
}
});

0 comments on commit 58283de

Please sign in to comment.