From de284cc5cc8a56839dfb3a49958e0ba33ab87408 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Sat, 27 Apr 2024 00:46:02 +0200 Subject: [PATCH] Add CONFIG_ASYNC_TCP_QUEUE_SIZE --- src/AsyncTCP.cpp | 2 +- src/AsyncTCP.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/AsyncTCP.cpp b/src/AsyncTCP.cpp index 5afccbc..9a4cdf0 100644 --- a/src/AsyncTCP.cpp +++ b/src/AsyncTCP.cpp @@ -97,7 +97,7 @@ static uint32_t _closed_index = []() { static inline bool _init_async_event_queue(){ if(!_async_queue){ - _async_queue = xQueueCreate(32, sizeof(lwip_event_packet_t *)); + _async_queue = xQueueCreate(CONFIG_ASYNC_TCP_QUEUE_SIZE, sizeof(lwip_event_packet_t *)); if(!_async_queue){ return false; } diff --git a/src/AsyncTCP.h b/src/AsyncTCP.h index 9c525cd..005ec51 100644 --- a/src/AsyncTCP.h +++ b/src/AsyncTCP.h @@ -65,6 +65,10 @@ extern "C" { #define CONFIG_ASYNC_TCP_PRIORITY 3 #endif +#ifndef CONFIG_ASYNC_TCP_QUEUE_SIZE +#define CONFIG_ASYNC_TCP_QUEUE_SIZE 32 +#endif + class AsyncClient; #define ASYNC_MAX_ACK_TIME 5000