X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/82c945cbf3ea97175cd2fba31f8ba92b9aade8ba..da331fea01b7d2bc15b7628366b03b9e3ba1a395:/bin/weathermon diff --git a/bin/weathermon b/bin/weathermon index ade5bfa..fdf092a 100755 --- a/bin/weathermon +++ b/bin/weathermon @@ -248,6 +248,9 @@ function processLine(str) return '{'..name..'}' end end) + if not mqtt_client:socket() then + mqtt_client:reconnect() + end mqtt_client:publish(mqtt_path,v,0,false) mqtt_client:loop() end @@ -289,6 +292,9 @@ function processLine(str) return '{'..name..'}' end end) + if not mqtt_client:socket() then + mqtt_client:reconnect() + end mqtt_client:publish(mqtt_path,msg_body,0,false) mqtt_client:loop() end