Skip to content

Commit

Permalink
Fix: Added check to ensure safe restart of dhcp fine timer
Browse files Browse the repository at this point in the history
  • Loading branch information
espressif-abhikroy committed Aug 15, 2023
1 parent 894e387 commit 8dad8d3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/ipv4/dhcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,9 @@ dhcp_fine_tmr(void)
}
#if ESP_LWIP_DHCP_FINE_TIMERS_ONDEMAND
if (tmr_restart) {
sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_fine_timeout_cb, (void *)netif);
if (dhcp->fine_timer_enabled == true) {
sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_fine_timeout_cb, (void *)netif);
}
} else {
sys_untimeout(dhcp_fine_timeout_cb, (void *)netif);
dhcp->fine_timer_enabled = false;
Expand Down

0 comments on commit 8dad8d3

Please sign in to comment.