-
Notifications
You must be signed in to change notification settings - Fork 307
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
Discover not working with new event loops. #93
Comments
I will have to look into this, but I think it is due to the |
I can confirm this situation in my side. No additional info yet. |
Sorry, didn't have the time to test it right away. Here's a test with my polar h10, but I don't see how a different BLE server would yield different results. Anyway, if the line where create is called is comented out it works as expected, if we create and use a new loop, it won't work. It just waits forever.
|
The core of the problem here is that bleak uses twisted below asyncio, though the The first example you provided works because there is no bleak interaction in the The second one is similar. Once you create the new loop and set it as default, all awaiting on the Service bus in bleak will fail. The simple solution: stop using multiple event loops with bleak's Linux backend. I will close this in the meantime. If I find the time and a solution I will reopen it. |
Yeah sounds good. Maybe add this piece of information to the documentation while it's relevant. |
Description
I want to write a small module that deals with a bluetoothle connection.
Everything works fine until I try to use a new event loop together with bleak.discover().
Please see MWE below for details.
What I Did
The text was updated successfully, but these errors were encountered: