Skip to content

Conversation

@odesenfans
Copy link
Collaborator

@odesenfans odesenfans commented May 2, 2023

Problem: upon closing, the message websocket may attempt to close the RabbitMQ channel. This appears to be caused by the handling of CancellationError in the close() method of the queue iterator.

Solution: replace the iterator implementation with a simpler consume + callback implementation. This guarantees that the secondary task will never attempt to close the channel. Replace task cancellation by a call to queue.cancel() as aiormq handles cancellation exceptions by closing the channel.

@odesenfans odesenfans force-pushed the od-fix-ws-timeout-exception branch 4 times, most recently from eb21158 to 664e75d Compare May 3, 2023 14:45
Problem: upon closing, the message websocket may attempt to close
the RabbitMQ channel. This appears to be caused by the handling
of `CancellationError` in the `close()` method of the queue
iterator.

Solution: replace the `iterator` implementation with a simpler
`consume` + callback implementation. This guarantees that
the secondary task will never attempt to close the channel.
Replace task cancellation by a call to `queue.cancel()` as
aiormq handles cancellation exceptions by closing the channel.
@odesenfans odesenfans force-pushed the od-fix-ws-timeout-exception branch from 664e75d to 753be84 Compare May 3, 2023 15:03
@odesenfans odesenfans merged commit 1f09e33 into master May 3, 2023
@odesenfans odesenfans deleted the od-fix-ws-timeout-exception branch May 3, 2023 15:19
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