Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how do I remove a listener which was attached using the ConnectionPromise.on() #244

Closed
AkhilKamath opened this issue May 28, 2023 · 3 comments

Comments

@AkhilKamath
Copy link

AkhilKamath commented May 28, 2023

ConnectionPromise constructor just exposes the .on(), .once(), & .listener() functions of the #conn object. there doesn't seem a way to remove a listener that was attached using on()

@rusher
Copy link
Collaborator

rusher commented May 31, 2023

All EventEmitters methods where not available on connection. This will be the case in next release

@rusher
Copy link
Collaborator

rusher commented Jun 21, 2023

corrected with 3.2.0 release.

@rusher rusher closed this as completed Jun 21, 2023
@AkhilKamath
Copy link
Author

Hi @rusher , thanks for the updates and support of event emitter methods!
Is there a reason we are not exposing the emit() method?
In my code I am handling connection error events but unable to write a testcase for it as I cannot forcefully call the emit method to emit an error event and test my error handling code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants