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(messagequeue): no retry after queue shutdown #38

Merged
merged 1 commit into from
Sep 25, 2019

Conversation

hannahhoward
Copy link
Collaborator

Goals

Remove warning log messages, but also shutdown quickly without unneccesary send attempts

Implementation

Previously, we allowed the last message send attempt to run to maxRetries if the queue was shutdown, which also generated warning logs.

Now, if a send attempt fails, check that the queue has shutdownand immediately return if it has

Adds a test to replicate the failing behavior and verify the fix resolves it -- the test does involve use of time expiry, which is non-ideal, but probably there is nothing we can do until we have a mocked time in this repo.

Previously, we allowed the last message send attempt to run to maxRetries if the queue was shutdown,
which also generated warning logs. Now, if a send attempt fails, check that the queue has shutdown
and immediately return if it has
@hannahhoward
Copy link
Collaborator Author

@Stebalien FYI this is something that's in go-bitswap that I'm sad to say somehow didn't make it over... eek! Sorry.

@anorth this is the fix for the log messages...

@hannahhoward hannahhoward merged commit d92aaa8 into master Sep 25, 2019
@mvdan mvdan deleted the bugs/fix-messagequeue-shutdown branch December 15, 2021 14:15
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