flyte / mqtt-io

Expose GPIO modules (Raspberry Pi, Beaglebone, PCF8754, PiFace2 etc.) and digital sensors (LM75 etc.) to an MQTT server for remote control and monitoring.
MIT License
460 stars 157 forks source link

Fix applying mqtt.reconnect_count by reordering except clauses #331

Closed zzeekk closed 4 months ago

zzeekk commented 10 months ago

Reconnect_count is not applied on mqtt server disconnect because exception is caught by general except clause. In consequence the MqttCodeError Exception doesnt reach the except clause to handle reconnect. By these bugfix the except clauses are reordered, so that the reconnect_count is applied again correctly.