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

What to do to stop the ClientQuery from disconnecting after a while #101

Open
ckocyigit opened this issue Feb 3, 2021 · 1 comment
Open

Comments

@ckocyigit
Copy link

Hello Guys,

Iam using this library to connect to the Clientquery locally and Iam waiting for events in an endless loop.

Unfortunetaly though when using ts3conn.send_keepalive() Iam getting the error that the method "version" is not available so my guess would be that this command is only usable within a serverquery.

I tried to keep the connection alive by sending a "whoami" command repeatingly. Without luck so far.

@pfandipfandautomat
Copy link

Just send a keepalive atleast every 5 minutes I think, and catch the "error".
Look at the example below

while True:
                        ts3conn.send_keepalive()
                        try:
                                event = ts3conn.wait_for_event(timeout=60)
                        except:
                                pass
                        else:
                             print(event[0])

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

No branches or pull requests

2 participants