Skip to content

Commit b548abc

Browse files
author
Bernhard Tittelbach
committed
fix ESPAsyncWebServer/issues/265 in AsyncTCP as well
1 parent 90715ae commit b548abc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/AsyncTCP.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,9 @@ void AsyncServer::end(){
12461246
if(_pcb){
12471247
tcp_arg(_pcb, NULL);
12481248
tcp_accept(_pcb, NULL);
1249-
_tcp_abort(_pcb, NULL);
1249+
if(tcp_close(_pcb) != ERR_OK){
1250+
_tcp_abort(_pcb, NULL);
1251+
}
12501252
_pcb = NULL;
12511253
}
12521254
}

0 commit comments

Comments
 (0)