Pavel Brychta 2023-02-04 18:38:43 +01:00
parent 06d5a8987a
commit a2ab207446

View File

@ -265,6 +265,9 @@ bool AsyncClient::connect(IPAddress ip, uint16_t port){
tcp_arg(pcb, this); tcp_arg(pcb, this);
tcp_err(pcb, &_s_error); tcp_err(pcb, &_s_error);
size_t err = tcp_connect(pcb, &addr, port,(tcp_connected_fn)&_s_connected); size_t err = tcp_connect(pcb, &addr, port,(tcp_connected_fn)&_s_connected);
if (err != ERR_OK) {
tcp_close(pcb);
}
return (ERR_OK == err); return (ERR_OK == err);
} }