Closed mattlevy closed 8 years ago
thanks for reporting, it is a bug, we will try to fix it asap.
@mattlevy if possible, could you provide your sketch. We could fix that quicker and make sure it work for you as well.
Here's my sketch as a text file. You'll need to fill in your own wifi network, etc. It should be clear where to do that.
You may notice that I have a global boolean "subscribed". That's because it's possible to subscribe multiple times to the same feed - I don't know if that's intended or not.
should be resolved on development branch, and get closed when merged to master
I've noticed that even though I do receive callbacks to my handlers when disconnected, the connected() method still returns true. This means that my connection loop, which only attempts to connect if connected() is false, never executes. If I add an express call to disconnect() to my handler, I do attempt a reconnect.
I'm not sure which behavior you want, but it should be either changed so that no manual call to disconnect() is necessary, or documented.
Note: I have only experienced this with the AdafruitTCP and AdafruitMQTT classes. I have not tried any others, although I would assume they're consistent.