thingsboard-python-client-sdk icon indicating copy to clipboard operation
thingsboard-python-client-sdk copied to clipboard

Examples do not end after disconnect function is called

Open bodiroga opened this issue 6 years ago • 4 comments

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

bodiroga avatar Jul 05 '19 11:07 bodiroga

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 avatar Jul 24 '19 01:07 apereiracv

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

apereiracv avatar Jul 24 '19 01:07 apereiracv

same problem here!

DiegoMartinezGlez avatar Oct 20 '20 13:10 DiegoMartinezGlez

Same problem.

win10 64bit ,conda python 3.7.7

No response from KeyboardInterrupt exception.

ghost avatar Oct 25 '20 18:10 ghost