Merge branch 'master' into fix-crash-on-fin-v2

This commit is contained in:
Me No Dev
2019-09-24 12:15:58 +03:00
committed by GitHub
2 changed files with 18 additions and 1 deletions

15
CMakeLists.txt Normal file
View 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)

View File

@@ -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;
}
}