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

Examples do not end after disconnect function is called #3

Open
bodiroga opened this issue Jul 5, 2019 · 4 comments
Open

Examples do not end after disconnect function is called #3

bodiroga opened this issue Jul 5, 2019 · 4 comments

Comments

@bodiroga
Copy link

bodiroga commented Jul 5, 2019

Hi again!

The provided examples do not exit even after calling the disconnect function of the client/gateway. Two reasons:

  • The mqtt client loop is not stopped in the disconnect function, _client.stop_loop() should be called (although I'm not sure if this is needed, but it should be a good practice)
  • The __timeout_thread is still running, because it loops forever (while True). This thread must be killed/stopped, otherwise the programs do not end.

Best regards,

Aitor

@apereiracv
Copy link

Hi @bodiroga,

I am facing the same issue about the clients not ending the thread. Have you found a definitive solution? Can you provide the modified code for both cases above? I'd really appreciate it :)

@apereiracv
Copy link

nvm, I found your pull request. Hopefully it will get accepted soon.

@DiegoMartinezGlez
Copy link

same problem here!

@ghost
Copy link

ghost commented Oct 25, 2020

Same problem.

win10 64bit ,conda python 3.7.7

No response from KeyboardInterrupt exception.

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

Successfully merging a pull request may close this issue.

3 participants