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 07d3b3330d
commit 87d44bbfcd

View File

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