From e48f2a5db865245a38fc90be8239e355af057482 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Tue, 10 Dec 2024 22:44:18 +0100 Subject: [PATCH] Fix missing lock/unlock around dns_gethostbyname --- src/AsyncTCP.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/AsyncTCP.cpp b/src/AsyncTCP.cpp index 21755f4..84a87ac 100644 --- a/src/AsyncTCP.cpp +++ b/src/AsyncTCP.cpp @@ -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