File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ LOG_COLOR=true
1616# Log Baileys - "fatal" | "error" | "warn" | "info" | "debug" | "trace"
1717LOG_BAILEYS = error
1818
19+ # Set the maximum number of listeners that can be registered for an event
20+ EVENT_EMITTER_MAX_LISTENERS = 50
21+
1922# Determine how long the instance should be deleted from memory in case of no connection.
2023# Default time: 5 minutes
2124# If you don't even want an expiration, enter the value false
Original file line number Diff line number Diff line change 33### Features
44
55* Sync lost messages on chatwoot
6+ * Set the maximum number of listeners that can be registered for events
67
78### Fixed
89
Original file line number Diff line number Diff line change 11import EventEmitter2 from 'eventemitter2' ;
22
3+ const maxListeners = parseInt ( process . env . EVENT_EMITTER_MAX_LISTENERS , 10 ) || 50 ;
4+
35export const eventEmitter = new EventEmitter2 ( {
46 delimiter : '.' ,
57 newListener : false ,
68 ignoreErrors : false ,
7- maxListeners : 50 ,
9+ maxListeners : maxListeners ,
810} ) ;
You can’t perform that action at this time.
0 commit comments