mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
Merge pull request #312 from IoTManagerProject/ver4dev
Стабилизация сокетов
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user