From b549e708bcf43a26b90670c0fdcc183ce078ea46 Mon Sep 17 00:00:00 2001 From: Deyaaeldeen Almahallawi Date: Thu, 2 May 2024 16:22:45 +0000 Subject: [PATCH] raise max listener limit for connections --- lib/connection.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/connection.js b/lib/connection.js index 381651b..53d852f 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -32,6 +32,7 @@ var tls = require('tls'); var EventEmitter = require('events').EventEmitter; var AMQP_PROTOCOL_ID = 0x00; +const MAX_LISTENER_LIMIT = 1000; function find_connect_config() { var paths; @@ -245,6 +246,7 @@ var Connection = function (options, container) { this.scheduled_reconnect = undefined; this.default_sender = undefined; this.closed_with_non_fatal_error = false; + this.setMaxListeners(MAX_LISTENER_LIMIT); var self = this; aliases.forEach(function (alias) { Object.defineProperty(self, alias, { get: remote_property_shortcut(alias) }); });