From 1019143d0d1778e47f67d33ddc9a03728aa82590 Mon Sep 17 00:00:00 2001 From: DmitriyTychina Date: Sun, 10 Sep 2023 18:24:55 +0300 Subject: [PATCH 1/2] =?UTF-8?q?=D0=BD=D0=B5=20=D1=88=D0=BB=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=BD=D0=BD=D1=8B=D0=B5=20Ws-=D0=BA=D0=BB=D0=B8?= =?UTF-8?q?=D0=B5=D0=BD=D1=82=D0=B0=D0=BC=20=D0=B5=D1=81=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=B8=D1=85=20=D0=BD=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WsServer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/WsServer.cpp b/src/WsServer.cpp index c8886ab6..7dd5c8ed 100644 --- a/src/WsServer.cpp +++ b/src/WsServer.cpp @@ -414,6 +414,10 @@ void sendFileToWsByFrames(const String& filename, const String& header, const St } void sendStringToWs(const String& header, String& payload, int client_id) { + if (!(WiFi.softAPgetStationNum() || isNetworkActive())) { + return; + } + if (header.length() != 6) { SerialPrint("E", "FS", F("wrong header size")); return; From 6892beeb388faf3cd7d17e8f586e9a1bcd585b79 Mon Sep 17 00:00:00 2001 From: DmitriyTychina Date: Sun, 10 Sep 2023 18:32:49 +0300 Subject: [PATCH 2/2] =?UTF-8?q?=D0=B2=20"Update=20device=20data:=20"=20?= =?UTF-8?q?=D0=B4=D0=B0=D0=B2=D0=B0=D0=BB=20=D0=BD=D0=B5=D0=BF=D0=B5=D1=87?= =?UTF-8?q?=D0=B0=D1=82=D0=B0=D0=B5=D0=BC=D1=8B=D0=B9=20=D1=81=D0=B8=D0=B2?= =?UTF-8?q?=D0=BE=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/Statistic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Statistic.cpp b/src/utils/Statistic.cpp index 621e1de5..1b34bf72 100644 --- a/src/utils/Statistic.cpp +++ b/src/utils/Statistic.cpp @@ -34,7 +34,7 @@ void updateDeviceStatus() { int httpResponseCode = http.POST(httpRequestData); if (httpResponseCode > 0) { - ret = httpResponseCode; + ret = http.errorToString(httpResponseCode).c_str(); if (httpResponseCode == HTTP_CODE_OK) { String payload = http.getString(); ret += " " + payload;