Edubits / Zway-MQTT

Publishes the status of devices to a MQTT topic and is able to set values based on subscribed topics.
Apache License 2.0
29 stars 16 forks source link

Timeout causes disconnect? #8

Closed i8beef closed 7 years ago

i8beef commented 7 years ago

I'm seeing an issue where when an MQTT client timeout (onTimeout event) is triggered, it simply calls onError for the client, which this module then just punts to self.onError. The module is setup to reconnect on an explicit onDisconnect, but I'm not sure a timeout event triggers that.

What I'm seeing at a macro level, is the MQTT connection in the module either goes down and doesn't come back, or just in general doesn't respond to MQTT published events anymore.

i8beef commented 7 years ago

Made a pull request that should fix this issue.