You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a connected client looses it's connection it starts a reconnect timer. After a few attempts the reconnect time is increased to 10 seconds and then to 60 seconds. Once it reaches 60 seconds it never successfully connects regardless of the availability of the iot service.
In node-red this results in having to restart node-red to get the node reconnected following an outage of the iot service, as happened this weekend.
The problem is ultimately a bug in the underlying mqtt library which I've raised here - mqttjs/MQTT.js#419
The workaround to the issue is to ensure the connectTimeout option passed to the MQTT client is always greater than the reconnectTimeout.
If a connected client looses it's connection it starts a reconnect timer. After a few attempts the reconnect time is increased to 10 seconds and then to 60 seconds. Once it reaches 60 seconds it never successfully connects regardless of the availability of the iot service.
In node-red this results in having to restart node-red to get the node reconnected following an outage of the iot service, as happened this weekend.
The problem is ultimately a bug in the underlying mqtt library which I've raised here - mqttjs/MQTT.js#419
The workaround to the issue is to ensure the
connectTimeout
option passed to the MQTT client is always greater than thereconnectTimeout
.I've tested a fix locally to this client by adding the following line here: https://github.com/ibm-watson-iot/iot-nodejs/blob/master/src/clients/BaseClient.js#L77
The text was updated successfully, but these errors were encountered: