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

fixed creating two connections instead of one cause close event handl… #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GinkoGintoki
Copy link

fixed bug where close event handler emitting after error handler and because of this creates two channels. Here amqplib reference docs: https://amqp-node.github.io/amqplib/channel_api.html#model_events

…er also be emitted after error event handler
@dtes
Copy link

dtes commented Jan 13, 2023

Hi @BDav24! Please, would you merge this pull request. The bug leads to a connection leak and connection limit.

Copy link
Member

@BDav24 BDav24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay I didn't get the notifications.

I think you can achieve the same in the reconnect method:

  async reconnect () {
    if (this.connecting) return

    this.connecting = true

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

Successfully merging this pull request may close these issues.

3 participants