unwatch files when removing them from the cache
This commit is contained in:
@@ -83,6 +83,7 @@ MBTiles.prototype._open = function(uri) {
|
||||
mbtiles._stat = stat;
|
||||
fs.watchFile(mbtiles.filename, { interval: 1000 }, function(cur, prev) {
|
||||
if (cur.mtime != prev.mtime) {
|
||||
fs.unwatchFile(mbtiles.filename);
|
||||
delete cache[uri.pathname];
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user