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

Automatically retry after getting badNonce error #4113

Merged
merged 4 commits into from Jan 26, 2017
Merged

Automatically retry after getting badNonce error #4113

merged 4 commits into from Jan 26, 2017

Conversation

bmw
Copy link
Member

@bmw bmw commented Jan 25, 2017

Fixes #2244 and fixes #4099.

@bmw
Copy link
Member Author

bmw commented Jan 25, 2017

This should be merged not squashed to give credit to the patch from #2244.

except messages.Error as error:
if should_retry and error.code == 'badNonce':
logger.debug('Retrying request after error:\n%s', error)
should_retry = False
Copy link
Contributor

Choose a reason for hiding this comment

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

if we're only trying once, we cooould just put self._post_once right in the except. this should be fine though.

@void-elf
Copy link
Contributor

lgtm!

@bmw
Copy link
Member Author

bmw commented Jan 26, 2017

Awesome. Thanks for the review guys. I agree with you on the just call self._post_once twice comment, but after talking to Erica, I'm not going to block the release on this (making the change also required changing tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants