From f0319ac64e2199d823f9c8f116f4765b121502f7 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Thu, 4 Jul 2024 12:14:45 +0200 Subject: [PATCH] Add fix from https://github.com/me-no-dev/AsyncTCP/pull/184 --- src/AsyncTCP.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AsyncTCP.cpp b/src/AsyncTCP.cpp index 135ba8c..4b61573 100644 --- a/src/AsyncTCP.cpp +++ b/src/AsyncTCP.cpp @@ -723,8 +723,8 @@ bool AsyncClient::_connect(ip_addr_t addr, uint16_t port){ tcp_recv(pcb, &_tcp_recv); tcp_sent(pcb, &_tcp_sent); tcp_poll(pcb, &_tcp_poll, 1); - _tcp_connect(pcb, _closed_slot, &addr, port,(tcp_connected_fn)&_tcp_connected); - return true; + esp_err_t err =_tcp_connect(pcb, _closed_slot, &addr, port,(tcp_connected_fn)&_tcp_connected); + return err == ESP_OK; } bool AsyncClient::connect(const IPAddress& ip, uint16_t port){