mirror of
https://github.com/esphome/esphome.git
synced 2026-02-28 09:54:19 -07:00
[wifi] Simplify comment — remove unverified link state claim
Cannot confirm wifi_station_disconnect() synchronously clears the lwIP netif LINK_UP flag on ESP8266 NONOS SDK. The comment doesn't need to make claims about link state since the fix is simply that the hostname never changes at runtime, making dhcp_renew() pointless. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -217,10 +217,9 @@ bool WiFiComponent::wifi_apply_hostname_() {
|
||||
}
|
||||
|
||||
// Update hostname on all lwIP interfaces so DHCP packets include it.
|
||||
// No dhcp_renew() call here — the hostname is fixed at compile time and
|
||||
// this function is only called during setup() or wifi_sta_connect_() when
|
||||
// the interface is always disconnected. lwIP includes the hostname in
|
||||
// DHCP DISCOVER/REQUEST automatically via LWIP_NETIF_HOSTNAME.
|
||||
// lwIP includes the hostname in DHCP DISCOVER/REQUEST automatically
|
||||
// via LWIP_NETIF_HOSTNAME — no dhcp_renew() needed. The hostname is
|
||||
// fixed at compile time and never changes at runtime.
|
||||
for (netif *intf = netif_list; intf; intf = intf->next) {
|
||||
#if LWIP_VERSION_MAJOR == 1
|
||||
intf->hostname = (char *) wifi_station_get_hostname();
|
||||
|
||||
Reference in New Issue
Block a user