mirror of
https://github.com/me-no-dev/AsyncTCP.git
synced 2025-08-02 20:24:42 +02:00
fix(AsyncTCP.cpp): connect() returns false if tcp_connect() fails (#184)
Using customized eModbus library don't connect due AsyncTCP::connect() allways return true
This commit is contained in:
@@ -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){
|
||||
|
Reference in New Issue
Block a user