Open MaffooClock opened 2 years ago
After studying lib/mqtt/client.rb, I wonder if after the connection drops and it is reconnected, if it's re-using the ssl_context instead of instantiating a new one?
As I understand it, an SSLContext cannot be modified after creation of an SSLSocket.
I see where @ssl_context
gets instantiated, but nowhere else is it ever cleaned up and re-set. Maybe in disconnect()
(and perhaps somewhere else) there should be something like @ssl_context = nil
, so that subsequent calls to ssl_context()
cause a new one to be instantiated?
I may be waaaaay off in left field here 🙃
I'm using this library to connect to AWS IoT -- works great! However, from time to time, I guess there's some sort of disruption in the connection (don't really have any good guesses on what those causes might be), and eventually my STDOUT is full of messages like this (because my script is attempting to reconnect):
The fix is simply to terminate the script and restart it, and it works fine again.
Is this gem leaving something dirty on the connection? Or is it my OpenSSL version? Or...?