소스 검색

Fermeture fichier

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;
 };