From 35eafc624af6e417af6c044e3edfaac45c70850d Mon Sep 17 00:00:00 2001 From: Pablo2048 Date: Fri, 20 Oct 2023 07:55:03 +0200 Subject: [PATCH] Update verze serveru z 3.0.0 na 3.1.0 --- library.json | 4 ++-- src/AsyncEventSource.h | 4 ++-- src/AsyncWebSocket.cpp | 2 +- src/AsyncWebSocket.h | 8 ++++++-- src/AsyncWebSynchronization.h | 4 ++-- src/ESPAsyncWebServer.h | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/library.json b/library.json index 7ad87d9..4e97100 100644 --- a/library.json +++ b/library.json @@ -12,8 +12,8 @@ "type": "git", "url": "https://github.com/esphome/ESPAsyncWebServer.git" }, - "version": "3.0.0", + "version": "3.1.0", "license": "LGPL-3.0", "frameworks": "arduino", - "platforms": ["espressif8266", "espressif32", "libretuya"] + "platforms": ["espressif8266", "espressif32", "libretiny"] } diff --git a/src/AsyncEventSource.h b/src/AsyncEventSource.h index b0ea6ff..42fd1f6 100644 --- a/src/AsyncEventSource.h +++ b/src/AsyncEventSource.h @@ -22,7 +22,7 @@ #include #include -#if defined(ESP32) || defined(LIBRETUYA) +#if defined(ESP32) || defined(LIBRETINY) #include #else #include @@ -43,7 +43,7 @@ #endif #endif -#if defined(ESP32) || defined(LIBRETUYA) +#if defined(ESP32) || defined(LIBRETINY) #define DEFAULT_MAX_SSE_CLIENTS 8 #else #define DEFAULT_MAX_SSE_CLIENTS 4 diff --git a/src/AsyncWebSocket.cpp b/src/AsyncWebSocket.cpp index ad197eb..6e88da9 100644 --- a/src/AsyncWebSocket.cpp +++ b/src/AsyncWebSocket.cpp @@ -102,7 +102,7 @@ size_t webSocketSendFrame(AsyncClient *client, bool final, uint8_t opcode, bool return 0; } } - client->send(); + if (!client->send()) return 0; return len; } diff --git a/src/AsyncWebSocket.h b/src/AsyncWebSocket.h index fd9eeed..d848793 100644 --- a/src/AsyncWebSocket.h +++ b/src/AsyncWebSocket.h @@ -22,13 +22,17 @@ #define ASYNCWEBSOCKET_H_ #include -#if defined(ESP32) || defined(LIBRETUYA) +#if defined(ESP32) || defined(LIBRETINY) #include +#ifndef WS_MAX_QUEUED_MESSAGES #define WS_MAX_QUEUED_MESSAGES 32 +#endif #else #include +#ifndef WS_MAX_QUEUED_MESSAGES #define WS_MAX_QUEUED_MESSAGES 8 #endif +#endif #include #include "AsyncWebSynchronization.h" @@ -40,7 +44,7 @@ #endif #endif -#if defined(ESP32) || defined(LIBRETUYA) +#if defined(ESP32) || defined(LIBRETINY) #define DEFAULT_MAX_WS_CLIENTS 8 #else #define DEFAULT_MAX_WS_CLIENTS 4 diff --git a/src/AsyncWebSynchronization.h b/src/AsyncWebSynchronization.h index ecfc29e..5e45d4d 100644 --- a/src/AsyncWebSynchronization.h +++ b/src/AsyncWebSynchronization.h @@ -5,7 +5,7 @@ #include -#if defined(ESP32) || (defined(LIBRETUYA) && LT_HAS_FREERTOS) +#if defined(ESP32) || (defined(LIBRETINY) && LT_HAS_FREERTOS) // This is the ESP32 version of the Sync Lock, using the FreeRTOS Semaphore class AsyncWebLock @@ -84,4 +84,4 @@ public: } }; -#endif // ASYNCWEBSYNCHRONIZATION_H_ \ No newline at end of file +#endif // ASYNCWEBSYNCHRONIZATION_H_ diff --git a/src/ESPAsyncWebServer.h b/src/ESPAsyncWebServer.h index 1e37d90..9330915 100644 --- a/src/ESPAsyncWebServer.h +++ b/src/ESPAsyncWebServer.h @@ -28,7 +28,7 @@ #include "StringArray.h" -#if defined(ESP32) || defined(LIBRETUYA) +#if defined(ESP32) || defined(LIBRETINY) #include #include #elif defined(ESP8266)