start syslog when network connected

This commit is contained in:
proddy
2021-03-29 22:25:44 +02:00
parent 8e59460845
commit 4d0032441f
5 changed files with 38 additions and 23 deletions

View File

@@ -611,7 +611,7 @@ void Mqtt::on_connect() {
doc["version"] = EMSESP_APP_VERSION;
#ifndef EMSESP_STANDALONE
if (ETH.linkUp()) {
if (EMSESP::system_.ethernet_connected()) {
doc["ip"] = ETH.localIP().toString();
} else {
doc["ip"] = WiFi.localIP().toString();