From 8426c9802bfe0207d64e5e17c7ad595516cd37c3 Mon Sep 17 00:00:00 2001 From: Nicholas O'Leary Date: Wed, 13 Nov 2013 15:00:55 +0000 Subject: [PATCH] Allow unlimited event listeners on mqttConnectionPool Fixes #71 --- nodes/io/lib/mqttConnectionPool.js | 1 + 1 file changed, 1 insertion(+) diff --git a/nodes/io/lib/mqttConnectionPool.js b/nodes/io/lib/mqttConnectionPool.js index bb0346490..6281a2cab 100644 --- a/nodes/io/lib/mqttConnectionPool.js +++ b/nodes/io/lib/mqttConnectionPool.js @@ -30,6 +30,7 @@ module.exports = { if (!connections[id]) { connections[id] = function() { var client = mqtt.createClient(port,broker); + client.setMaxListeners(0); var options = {keepalive:15,clientId:'mqtt_' + (1+Math.random()*4294967295).toString(16)}; var queue = []; var subscriptions = [];