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 asyncio timeout error when getting rate limit, status code 420 #1621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tuangeek
Copy link

improves handle connection errors when asynchronous streaming.

asyncio runs into timeout error if stream reaches rate limit (status_code 420). This is similar to 68e19cc

Copy link

@jai-dewani jai-dewani left a comment

Choose a reason for hiding this comment

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

I think unnecessary imports can be removed as they are not needed

@@ -3,6 +3,7 @@
# See LICENSE for details.

import asyncio
from asyncio import TimeoutError

Choose a reason for hiding this comment

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

This import won't be required as you have referenced TimeoutError as asyncio.TimeoutError.

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.

None yet

3 participants