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

[Bug]: Event listener on .once is called multiple times #393

Closed
schaeferto opened this issue May 4, 2023 · 4 comments · Fixed by #394
Closed

[Bug]: Event listener on .once is called multiple times #393

schaeferto opened this issue May 4, 2023 · 4 comments · Fixed by #394

Comments

@schaeferto
Copy link

Describe the bug

When registering an event listener on a new consumer object using .once(), this listener is called multiple times.

Your minimal, reproducible example

https://stackblitz.com/edit/nestjs-typescript-starter-agfsxk?file=src/app.controller.ts

Steps to reproduce

Watch the console log statements.

Expected behavior

The event listener should only be called once.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: mac
  • node: 16.7

Package version

v7.0.3

AWS SDK version

v3.316.0

Additional context

No response

@nicholasgriffintn
Copy link
Member

Thanks for the issue and the reproduction, super helpful.

I'll take a look into this and get back the reason this might be happening.

@schaeferto
Copy link
Author

Perfect. Thanks for your help!

@nicholasgriffintn
Copy link
Member

nicholasgriffintn commented May 6, 2023

This has been resolved in the version 7.1.0-canary.2:

https://stackblitz.com/edit/nestjs-typescript-starter-e4tyij?file=package.json

I don't know when 7.1.0 will be fully released, but the plan is to finish up just a couple more bits and then it will be released, the canary version should be perfectly fine to use in the meantime if this is an important issue for you.

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants