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

Retry if request failed due to rate-limit #62

Merged
merged 1 commit into from
Oct 26, 2016

Conversation

anewusername
Copy link
Contributor

Temporary fix for #6 so things stop failing due to rate-limits.
If the request fails, waits retry_after_ms and then resends it.

Signed-off-by: Jan Petykiewicz anewusername@gmail.com

Signed-off-by: Jan Petykiewicz <anewusername@gmail.com>
@matrixbot
Copy link
Member

Can one of the admins verify this patch?

@Half-Shot
Copy link
Collaborator

ok to test

@Half-Shot Half-Shot merged commit 2dd749b into matrix-org:master Oct 26, 2016
@Half-Shot
Copy link
Collaborator

LGTM

@anewusername anewusername deleted the ratelimit branch October 27, 2016 00:26
verify=self.validate_cert
)
response = None
while True:
Copy link
Contributor

@pik pik Apr 17, 2017

Choose a reason for hiding this comment

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

Adding blocking code to the default _send method in the SDK is really not a nice idea. Clients using the SDK can have different concurrency models and dealing with re-tries is much better left to them.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hmm, you might be right on this one. It probably would make more sense to make this optional.

@pik pik mentioned this pull request May 6, 2017
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.

4 participants