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

await connector.stop() cause infinite loop #38

Closed
olivialba opened this issue Oct 21, 2023 · 2 comments
Closed

await connector.stop() cause infinite loop #38

olivialba opened this issue Oct 21, 2023 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@olivialba
Copy link

When the client closes, 'await connector.stop()' causes an infinite loop, making the 'async def disconnect(_)' repeat infinitely. I am using the normal code example from the docs:

`from lcu_driver import Connector

connector = Connector()

@connector.ready
async def connect(connection):
print('LCU API is ready to be used.')

@connector.close
async def disconnect(_):
print('The client have been closed!')
await connector.stop()

@connector.ws.register('/lol-summoner/v1/current-summoner', event_types=('UPDATE',))
async def icon_changed(connection, event):
print(f'The summoner {event.data["displayName"]} was updated.')

connector.start()`

@Avnsx
Copy link

Avnsx commented Oct 21, 2023

Duplicate of: #34 & #18

@sousa-andre
Copy link
Owner

Closing this as it is a duplicate. Thank you for pointing it out @Avnsx!

@sousa-andre sousa-andre added the duplicate This issue or pull request already exists label Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants