silence first ntp timeout notice when client is sleeping

This commit is contained in:
fduncanh
2022-03-11 17:34:14 -05:00
parent ac1a3cb327
commit 56233e36d1

View File

@@ -281,8 +281,9 @@ raop_ntp_thread(void *arg)
if (response_len < 0) {
timeout_counter++;
char time[28];
int level = (timeout_counter == 1 ? LOGGER_DEBUG : LOGGER_ERR);
ntp_timestamp_to_time(send_time, time, sizeof(time));
logger_log(raop_ntp->logger, LOGGER_ERR, "raop_ntp receive timeout %d (limit %d) (request sent %s)",
logger_log(raop_ntp->logger, level, "raop_ntp receive timeout %d (limit %d) (request sent %s)",
timeout_counter, raop_ntp->max_ntp_timeouts, time);
if (timeout_counter == raop_ntp->max_ntp_timeouts) {
conn_reset = true; /* client is no longer responding */