mirror of
https://github.com/me-no-dev/AsyncTCP.git
synced 2025-08-10 16:14:29 +02:00
Merge branch 'fix-crash-on-fin-v2'
This commit is contained in:
15
CMakeLists.txt
Normal file
15
CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
set(COMPONENT_SRCDIRS
|
||||
"src"
|
||||
)
|
||||
|
||||
set(COMPONENT_ADD_INCLUDEDIRS
|
||||
"src"
|
||||
)
|
||||
|
||||
set(COMPONENT_REQUIRES
|
||||
"arduino-esp32"
|
||||
)
|
||||
|
||||
register_component()
|
||||
|
||||
target_compile_options(${COMPONENT_TARGET} PRIVATE -fno-rtti)
|
@@ -78,7 +78,7 @@ typedef struct {
|
||||
|
||||
static xQueueHandle _async_queue;
|
||||
static TaskHandle_t _async_service_task_handle = NULL;
|
||||
const int _number_of_closed_slots = 16;
|
||||
const int _number_of_closed_slots = CONFIG_LWIP_MAX_ACTIVE_TCP;
|
||||
static int _closed_index = 0;
|
||||
static int _closed_slots[_number_of_closed_slots];
|
||||
|
||||
@@ -1278,7 +1278,9 @@ void AsyncServer::end(){
|
||||
if(_pcb){
|
||||
tcp_arg(_pcb, NULL);
|
||||
tcp_accept(_pcb, NULL);
|
||||
_tcp_abort(_pcb, -1);
|
||||
if(tcp_close(_pcb) != ERR_OK){
|
||||
_tcp_abort(_pcb, -1);
|
||||
}
|
||||
_pcb = NULL;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user