Skip to content

Commit 0714013

Browse files
committed
Allow setting stack size via user defines
Based on me-no-dev/AsyncTCP#89 . This is a trivial change and potentially useful.
1 parent 9a6ab11 commit 0714013

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/AsyncTCP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ static bool _start_asyncsock_task(void)
6363
xTaskCreateUniversal(
6464
_asynctcpsock_task,
6565
"asyncTcpSock",
66-
8192 * 2,
66+
CONFIG_ASYNC_TCP_STACK,
6767
NULL,
6868
3, // <-- TODO: make priority a compile-time parameter
6969
&_asyncsock_service_task_handle,

src/AsyncTCP.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ extern "C" {
4444
#define CONFIG_ASYNC_TCP_RUNNING_CORE -1 //any available core
4545
#define CONFIG_ASYNC_TCP_USE_WDT 1 //if enabled, adds between 33us and 200us per event
4646
#endif
47+
#ifndef CONFIG_ASYNC_TCP_STACK
48+
#define CONFIG_ASYNC_TCP_STACK 16384 // 8192 * 2
49+
#endif
4750

4851
class AsyncClient;
4952

0 commit comments

Comments
 (0)