I noticed that when a simple legatoClient app is mqtt connected to the mqttClient and the user manually stops the legatoClient app. The next time the legatoClient app starts it fails with
"mqtt disconnected: err:1 subErr:-1"
A work around is to mqtt_Disconnect() at the start of legatoClient. I will add a SIGTERM handler to mqtt_Disconnect() which is probably a better workaround.
But maybe mqttClient could detect legatoClient closing and clean up ?
I noticed that when a simple legatoClient app is mqtt connected to the mqttClient and the user manually stops the legatoClient app. The next time the legatoClient app starts it fails with
"mqtt disconnected: err:1 subErr:-1"
A work around is to mqtt_Disconnect() at the start of legatoClient. I will add a SIGTERM handler to mqtt_Disconnect() which is probably a better workaround.
But maybe mqttClient could detect legatoClient closing and clean up ?