Merge pull request #311 from DmitriyTychina/ver4dev-x

Небольшие, но важные изменения.
This commit is contained in:
2023-09-10 20:16:21 +03:00
committed by GitHub
2 changed files with 5 additions and 1 deletions

View File

@@ -414,6 +414,10 @@ void sendFileToWsByFrames(const String& filename, const String& header, const St
} }
void sendStringToWs(const String& header, String& payload, int client_id) { void sendStringToWs(const String& header, String& payload, int client_id) {
if (!(WiFi.softAPgetStationNum() || isNetworkActive())) {
return;
}
if (header.length() != 6) { if (header.length() != 6) {
SerialPrint("E", "FS", F("wrong header size")); SerialPrint("E", "FS", F("wrong header size"));
return; return;

View File

@@ -34,7 +34,7 @@ void updateDeviceStatus() {
int httpResponseCode = http.POST(httpRequestData); int httpResponseCode = http.POST(httpRequestData);
if (httpResponseCode > 0) { if (httpResponseCode > 0) {
ret = httpResponseCode; ret = http.errorToString(httpResponseCode).c_str();
if (httpResponseCode == HTTP_CODE_OK) { if (httpResponseCode == HTTP_CODE_OK) {
String payload = http.getString(); String payload = http.getString();
ret += " " + payload; ret += " " + payload;