Skip to content

Commit

Permalink
Fix: Required to lock TCPIP core functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Nov 12, 2024
1 parent 48a37de commit d250960
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/AsyncTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1531,9 +1531,11 @@ void AsyncServer::end(){
TCP_MUTEX_LOCK();
tcp_arg(_pcb, NULL);
tcp_accept(_pcb, NULL);
TCP_MUTEX_UNLOCK();
if(tcp_close(_pcb) != ERR_OK){
TCP_MUTEX_UNLOCK();
_tcp_abort(_pcb, -1);
} else {
TCP_MUTEX_UNLOCK();
}
_pcb = NULL;
}
Expand Down

0 comments on commit d250960

Please sign in to comment.