Skip to content

Commit

Permalink
Fix missing lock/unlock around dns_gethostbyname
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Dec 10, 2024
1 parent ebf989f commit e48f2a5
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 @@ -787,7 +787,9 @@ bool AsyncClient::connect(const char* host, uint16_t port){
return false;
}

TCP_MUTEX_LOCK();
err_t err = dns_gethostbyname(host, &addr, (dns_found_callback)&_tcp_dns_found, this);
TCP_MUTEX_UNLOCK();
if(err == ERR_OK) {
#if ESP_IDF_VERSION_MAJOR < 5
#if LWIP_IPV6
Expand Down

0 comments on commit e48f2a5

Please sign in to comment.