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