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

fix problem with dangling channels on connection restore #423

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

Conversation

przemyslawfierek-silvair
Copy link
Contributor

This patch fixes problem with unexpected restoration already closed
channels (after reconnect to the AMQP broker) when the `RobustConnection`
is being used. The problem is caused by the not freeing reference to the
`aiopika.Channel._on_return` kept by the `aiormq.Channel.on_return_callbacks`,
which blocks garbage collector against free a `RobustChannel` object.

This patch fixes problem with unexpected restoration already closed
channels (after reconnect to the AMQP broker) when the `RobustConnection`
is being used. The problem is caused by the not freeing reference to the
`aiopika.Channel._on_return` kept by the `aiormq.Channel.on_return_callbacks`,
which blocks garbage collector against free a `RobustChannel` object.
@przemyslawfierek-silvair
Copy link
Contributor Author

To reproduce issue:

  1. Open RobustConnection to a AMQP broker
  2. Create RobustChannel
  3. Create Queue with flags exclusive=True and auto_delete=True
  4. Close the channel (note that the Queue has been automatically deleted)
  5. Restart the AMQP broker
  6. Note that the Channel and the Queue has been restored

@mosquito
Copy link
Owner

@przemyslawfierek-silvair thank you for your contribution. Please be patient, I have been allowing the execution of the test, but I am unlikely to be able to merge it in the near future.

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.

2 participants