Merge pull request #15 from IoTManagerProject/ver4dev

Ver4dev
This commit is contained in:
Mit4el
2023-09-12 19:54:57 +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) {
if (!(WiFi.softAPgetStationNum() || isNetworkActive())) {
return;
}
if (header.length() != 6) {
SerialPrint("E", "FS", F("wrong header size"));
return;

View File

@@ -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;