prevent maxlisteners error

we only attach with .once() and always .emit(). Debugging as shown that
there are no "memory leaks" with listeners being added infinitely.
This commit is contained in:
Konstantin Käfer
2011-09-14 21:13:16 +02:00
parent 4a2aa38533
commit d3145213aa

View File

@@ -53,6 +53,7 @@ function MBTiles(uri, callback) {
var key = url.format(uri);
if (!cache[key]) {
this.setMaxListeners(0);
cache[key] = this;
this._open(uri);
}