sntp: ensure sntp_retry_timeout reaches the configured limit

See bug #57620

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt 2020-01-30 20:47:19 +01:00
parent 3b2d7e289a
commit 32a72b1a20

View File

@ -388,6 +388,8 @@ sntp_retry(void *arg)
if ((new_retry_timeout <= SNTP_RETRY_TIMEOUT_MAX) &&
(new_retry_timeout > sntp_retry_timeout)) {
sntp_retry_timeout = new_retry_timeout;
} else {
sntp_retry_timeout = SNTP_RETRY_TIMEOUT_MAX;
}
}
#endif /* SNTP_RETRY_TIMEOUT_EXP */