Skip to content

esphome/AsyncTCP-esphome @ ^2.1.0 does NOT compile #7

@homonto

Description

@homonto
Compiling .pio/build/box42/lib962/ESPAsyncWebServer-esphome/AsyncEventSource.cpp.o
.pio/libdeps/box42/AsyncTCP-esphome/src/AsyncTCP.cpp:753:2: error: #else without #if
 #else
  ^~~~
.pio/libdeps/box42/AsyncTCP-esphome/src/AsyncTCP.cpp:755:2: error: #endif without #if
 #endif
  ^~~~~
.pio/libdeps/box42/AsyncTCP-esphome/src/AsyncTCP.cpp:1020: error: unterminated #if
 #if LWIP_IPV4 && LWIP_IPV6

here:

bool AsyncClient::connect(const char* host, uint16_t port){
    ip_addr_t addr;

    if(!_start_async_task()){
      log_e("failed to start task");
      return false;
    }

    err_t err = dns_gethostbyname(host, &addr, (dns_found_callback)&_tcp_dns_found, this);
    if(err == ERR_OK) {
        if(addr.type == IPADDR_TYPE_V6) {
            return connect(IPv6Address(addr.u_addr.ip6.addr), port);
        }
        return connect(IPAddress(addr.u_addr.ip4.addr), port);
#else
        return connect(IPAddress(addr.addr), port);
#endif
    } else if(err == ERR_INPROGRESS) {
        _connect_port = port;
        return true;
    }
    log_e("error: %d", err);
    return false;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions