Loquicom преди 5 години
родител
ревизия
429238950b
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  1. 2 0
      src/skip.js

+ 2 - 0
src/skip.js

@@ -7,6 +7,7 @@ module.exports.begin = function (file, search) {
     do {
         let line = '';
         if (!(line = liner.next())) {
+            liner.close();
             return 0;
         }
         line = line.toString();
@@ -17,5 +18,6 @@ module.exports.begin = function (file, search) {
         }
         count += line.length;
     } while (!stop);
+    liner.close();
     return count;
 };