Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Commit 991f855

Browse files
authored
Close the pcb on server::end
1 parent 3d030db commit 991f855

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ESPAsyncTCP.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,9 @@ void AsyncServer::end(){
858858
tcp_abort(_pcb);
859859
tcp_arg(_pcb, NULL);
860860
tcp_accept(_pcb, NULL);
861+
if(tcp_close(_pcb) != ERR_OK){
862+
tcp_abort(_pcb);
863+
}
861864
_pcb = NULL;
862865
}
863866
#if ASYNC_TCP_SSL_ENABLED

0 commit comments

Comments
 (0)