From d3145213aa2824112bc24decf123fc9b5ad3602b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 14 Sep 2011 21:13:16 +0200 Subject: [PATCH] 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. --- lib/mbtiles.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mbtiles.js b/lib/mbtiles.js index 037cba6..8dfdcc9 100644 --- a/lib/mbtiles.js +++ b/lib/mbtiles.js @@ -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); }