Apply modified patch #9533: sys_check_timeouts: recalculate the time diff after each handler call

Adapted to new timer implementation
This commit is contained in:
Dirk Ziegelmeier 2018-01-05 11:43:48 +01:00
parent dd3861720f
commit 2b4dde84e3

View File

@ -317,11 +317,11 @@ sys_check_timeouts(void)
u8_t had_one;
u32_t now;
now = sys_now();
do {
PBUF_CHECK_FREE_OOSEQ();
had_one = 0;
tmptimeout = next_timeout;
now = sys_now();
if (tmptimeout && TIMER_LESS_THAN(tmptimeout, now)) {
/* timeout has expired */
had_one = 1;
@ -342,6 +342,9 @@ sys_check_timeouts(void)
}
/* repeat until all expired timers have been called */
} while (had_one);
} else {
PBUF_CHECK_FREE_OOSEQ();
LWIP_TCPIP_THREAD_ALIVE();
}
}