event-emitter
event-emitter copied to clipboard
EventEmitterModuleOptions maxListeners setting isn't applied
Is there an existing issue for this?
- [X] I have searched the existing issues
Current behavior
The code taken from the official guide doesn't seem to work for me.. I've got a config for eventing module
export const globalEventingConfig : EventEmitterModuleOptions = {
global: true,
wildcard: true,
maxListeners: 32
}
Which is used in the module definition:
@Module({
imports: [
EventEmitterModule.forRoot(globalEventingConfig),
],
providers: [
EventEmitterService
]
})
export class AlPacinoModule { }
Yes, I still have memory leak warnings at startup: MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ready listeners added to [Client]. Use emitter.setMaxListeners() to increase limit
What am I doing wrong? Thanks a mil!
Minimum reproduction code
https://github.com/singulart/
Steps to reproduce
nest start
Expected behavior
No warning is shown in logs
Package version
1.3.1
NestJS version
8.4.7
Node.js version
16.15.0
In which operating systems have you tested?
- [X] macOS
- [ ] Windows
- [ ] Linux
Other
No response