Skip to content

Commit 55e63d9

Browse files
authored
Merge pull request #59 from jsoref/close-callback-nop
provide callback to fix: The "listener" argument must be of type Func…
2 parents 69ff3a6 + 0aba15f commit 55e63d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/cache.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function Cache(opts) {
1212
this.opts.path = opts.path || path.join(__dirname, '/../cache');
1313

1414
this.locks = {};
15-
15+
var nop = function() {};
1616

1717
this.stat = function(fullpath) {
1818
if (!fs.existsSync(fullpath))
@@ -55,7 +55,7 @@ function Cache(opts) {
5555
var path = this.getPath(key),
5656
file = fs.createReadStream(path.full);
5757
file.on('finish', function() {
58-
file.close();
58+
file.close(nop);
5959
});
6060

6161
return file;
@@ -75,7 +75,7 @@ function Cache(opts) {
7575
file.on('finish', function() {
7676
// release lock
7777
delete (locks[key]);
78-
file.close();
78+
file.close(nop);
7979
});
8080

8181
return file;

0 commit comments

Comments
 (0)