Skip to content

Adding read_with_timeout function to the library #110

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

duck-5
Copy link

@duck-5 duck-5 commented Jun 14, 2025

Allows users to read a specific amount of bytes with a timeout (something that isn't supported natively on asyncio.StreamReader).

This is meant to avoid the case of await reader.read(...) that waits forever if there's no info, and handles case with delays in the stream. It tries it's best to read until all bytes were read or timeout has reached.

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