lcu-driver icon indicating copy to clipboard operation
lcu-driver copied to clipboard

connector.stop() issue

Open KillerBOSS2019 opened this issue 4 years ago • 3 comments

connector.stop() does not work, well it works with that pull requests but not when the League client isnt open

KillerBOSS2019 avatar Aug 20 '21 19:08 KillerBOSS2019

You're right. I'll take a look into that as soon as possible.

sousa-andre avatar Aug 21 '21 20:08 sousa-andre

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

https://github.com/sousa-andre/lcu-driver/blob/35da052e47807e6ea7a246093778c58a43f2210e/lcu_driver/connection.py#L74

Avnsx avatar Jul 05 '22 03:07 Avnsx

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

https://github.com/sousa-andre/lcu-driver/blob/35da052e47807e6ea7a246093778c58a43f2210e/lcu_driver/connection.py#L74

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.

sousa-andre avatar Aug 13 '23 23:08 sousa-andre