Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(AsyncTCP.cpp): connect() returns false if tcp_connect() fails
Using customized eModbus library don't connect due AsyncTCP::connect() allways return true
  • Loading branch information
jaimelaguia authored Jun 18, 2024
commit 3e6a071682ea00eba3b70bf90fe3afdbfcc1ed6d
4 changes: 2 additions & 2 deletions src/AsyncTCP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,8 +700,8 @@ bool AsyncClient::connect(IPAddress ip, uint16_t port){
tcp_sent(pcb, &_tcp_sent);
tcp_poll(pcb, &_tcp_poll, 1);
//_tcp_connect(pcb, &addr, port,(tcp_connected_fn)&_s_connected);
_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 char* host, uint16_t port){
Expand Down