Continue ethernet setup if hostname fails (#2430)

This commit is contained in:
Tom Matheussen 2021-10-15 20:46:58 +02:00 committed by GitHub
parent 85d2f24447
commit 884b7201de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -168,7 +168,9 @@ void EthernetComponent::start_connect_() {
esp_err_t err; esp_err_t err;
err = tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_ETH, App.get_name().c_str()); err = tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_ETH, App.get_name().c_str());
ESPHL_ERROR_CHECK(err, "ETH set hostname error"); if (err != ERR_OK) {
ESP_LOGW(TAG, "tcpip_adapter_set_hostname failed: %s", esp_err_to_name(err));
}
tcpip_adapter_ip_info_t info; tcpip_adapter_ip_info_t info;
if (this->manual_ip_.has_value()) { if (this->manual_ip_.has_value()) {