-
Notifications
You must be signed in to change notification settings - Fork 15
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
connector.stop() issue #18
Comments
You're right. I'll take a look into that as soon as possible. |
Pretty sure the issue is because we are trying to listen to websockets, while the league client which hosts the LCU API endpoints is closed. So it gets stuck there, because run_ws ends up being an infinite loop lcu-driver/lcu_driver/connection.py Line 74 in 35da052
|
+ fixes (sousa-andre#18) + Each WebSocket registered by the user is now stored in a list called self.connections. This allows us to iterate over each stored connection object later when the connector.stop() method is called. By unregistering each connection, the method can successfully close the connections as intended. This prevents the occurrence of an infinite loop, which could happen if the @connector.ws.register() decorator was used to register a connection before
This problem only happens when the client is not yet opened. I expect to solve this issue in the next release by creating a new method that should be ran in a different thread in order to stop the library when it's looking for new clients. |
connector.stop() does not work, well it works with that pull requests but not when the League client isnt open
The text was updated successfully, but these errors were encountered: