Closed syoder closed 8 years ago
Good improvement, thanks!
Thanks for the quick response and merging! Any plans to release a new version to rubygems soon?
I don't currently feel very confident about the reliability of the QoS 1 support in the ruby gem.
I have been hesitant about releasing because of that. What is your experience of it?
Funny you ask - I tried QoS level 1 and it didn't work the way I thought it would. I haven't done a lot of testing yet though. I'm using this with Amazon's IoT service and hadn't gotten to the bottom of whether it was their broker or the client.
But I'm still learning about MQTT, and I'm in the beginning stages of integrating it into my project. I'll keep this in mind as I go and see if I can figure anything out w/r/t QoS 1.
Also includes a spec for this behavior. This will cause the client to disconnect even in cases where the connect block raises an exception.
I was connecting my mqtt client inside a thread. In certain circumstances, I would kill that thread and later reconnect. I noticed that every time I did that the number of threads in my process would go up by one. It turned out to be the client's
@read_thread
that was left dangling. With this change, the@read_thread
gets properly terminated.