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 poll/select for Windows #690

Merged
merged 5 commits into from
Mar 15, 2023
Merged

Conversation

strunker
Copy link
Contributor

@strunker strunker commented Dec 21, 2022

Added OS detection in socket code. If os is not windows, the newer select poll code is used, otherwise the older working Windows code is utlized.

Added in os detection so that select and poll are correctly utilized dependent on running OS.
Added a check to see if poll is part of avail methods on select object. Fixes the windows vs linux problem.
the hasattr check should take place only once as part of the class constructor, we simply check the object property on any subsequent call to run_once.
@elibroftw
Copy link

@emontnemery Can we get this merged / reviewed? I'm currently shipping my music player with 13.0.1 after realizing the 13.0.2 I shipped two days ago was buggy for my users.

@elibroftw
Copy link

I'm thinking it may be prudent to just use your fork as the requirement as it incorporates 13.0.2..13.0.4?

@ganlbarone
Copy link

I dont see why you cant. The fix is pretty straight forward and works well. I have been using this fork for months on end without a single issue.

@emontnemery emontnemery changed the title Fixed poll/select Fix poll/select for Windows Mar 15, 2023
@emontnemery emontnemery merged commit 0fcf036 into home-assistant-libs:master Mar 15, 2023
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