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

Add timeout on publish #431

Merged
merged 1 commit into from
Aug 14, 2024
Merged

Add timeout on publish #431

merged 1 commit into from
Aug 14, 2024

Conversation

isra17
Copy link
Member

@isra17 isra17 commented Aug 14, 2024

I found a race condition in aiormq where publish (and perhaps other blocking calls) can await forever in case of rabbitmq disconnection. Even the timeout param is not enough to protect against this.

The internal timeout is implemented through asyncio.wait_for anyway, so here it is. There might be a similar issue with the consumer message ack, will have a quick look at this too.

@isra17
Copy link
Member Author

isra17 commented Aug 14, 2024

Yup, every single aiormq calls seems to be one disconnect away from deadlocking.

@isra17 isra17 merged commit 2c79613 into main Aug 14, 2024
3 checks passed
@isra17 isra17 deleted the isra/publish-timeout branch August 14, 2024 20:02
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.

1 participant