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

Consider calling receive with a timeout instead of wrapping it in wait_for as its much more efficent #26

Open
bdraco opened this issue Sep 1, 2024 · 0 comments

Comments

@bdraco
Copy link

bdraco commented Sep 1, 2024

while msg := await asyncio.wait_for(ws.receive(), timeout):

https://docs.aiohttp.org/en/stable/_modules/aiohttp/client_ws.html#ClientWebSocketResponse.receive

Noticed this in the logs submitted by a user in home-assistant/core#125001

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

No branches or pull requests

1 participant