fix ESPAsyncWebServer/issues/265 in AsyncTCP as well

This commit is contained in:
Bernhard Tittelbach
2019-08-06 20:11:14 +02:00
parent 90715ae6b3
commit b548abc97c

View File

@@ -1246,7 +1246,9 @@ void AsyncServer::end(){
if(_pcb){
tcp_arg(_pcb, NULL);
tcp_accept(_pcb, NULL);
_tcp_abort(_pcb, NULL);
if(tcp_close(_pcb) != ERR_OK){
_tcp_abort(_pcb, NULL);
}
_pcb = NULL;
}
}