X-Git-Url: https://git.rvb.name/weathermon.git/blobdiff_plain/82c945cbf3ea97175cd2fba31f8ba92b9aade8ba..d16665cbaa8fa6699e66d11c8bc019b06af6d44a:/bin/weathermon?ds=inline 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