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

Commit d250960

Browse files
committed
Fix: Required to lock TCPIP core functionality
See: espressif/arduino-esp32#10526 (comment)
1 parent 48a37de commit d250960

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
@@ -1531,9 +1531,11 @@ void AsyncServer::end(){
15311531
TCP_MUTEX_LOCK();
15321532
tcp_arg(_pcb, NULL);
15331533
tcp_accept(_pcb, NULL);
1534-
TCP_MUTEX_UNLOCK();
15351534
if(tcp_close(_pcb) != ERR_OK){
1535+
TCP_MUTEX_UNLOCK();
15361536
_tcp_abort(_pcb, -1);
1537+
} else {
1538+
TCP_MUTEX_UNLOCK();
15371539
}
15381540
_pcb = NULL;
15391541
}

0 commit comments

Comments
 (0)