Skip to content

Commit

Permalink
Fix #27: Required to lock TCPIP core functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Oct 27, 2024
1 parent c4eac09 commit 45b7ee8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AsyncTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,13 +951,15 @@ int8_t AsyncClient::_connected(tcp_pcb* pcb, int8_t err){

void AsyncClient::_error(int8_t err) {
if(_pcb){
TCP_MUTEX_LOCK();
tcp_arg(_pcb, NULL);
if(_pcb->state == LISTEN) {
tcp_sent(_pcb, NULL);
tcp_recv(_pcb, NULL);
tcp_err(_pcb, NULL);
tcp_poll(_pcb, NULL, 0);
}
TCP_MUTEX_UNLOCK();
_free_closed_slot();
_pcb = NULL;
}
Expand Down

0 comments on commit 45b7ee8

Please sign in to comment.