Permalink
Browse files

Changes to reconnection method required

  • Loading branch information...
1 parent b10dde8 commit 5bb62963b6d936d9ee1da71101f5014a25e64ab7 @kylegordon committed Sep 26, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 mqtt-republisher.py
View
@@ -71,7 +71,9 @@ def on_disconnect(result_code):
logging.info("Clean disconnection")
else:
## FIXME - is this the right way to reconnect?
+ ## No, as it doesn't work.
logging.info("Unexpected disconnection! Trying to connect back in 5 seconds")
+ logging.debug("Result code: %s", result_code)
time.sleep(5)
mqttc.connect(MQTT_HOST, MQTT_PORT, 60, True)

0 comments on commit 5bb6296

Please sign in to comment.