Explorar o código

Fermeture fichier

Loquicom %!s(int64=5) %!d(string=hai) anos
pai
achega
429238950b
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;
 };