diff --git a/src/timesync/timesyncd-manager.c b/src/timesync/timesyncd-manager.c index 5f16ed2b948..5cec9c9f849 100644 --- a/src/timesync/timesyncd-manager.c +++ b/src/timesync/timesyncd-manager.c @@ -1027,7 +1027,7 @@ clear: return r; } -bool manager_is_connected(Manager *m) { +static bool manager_is_connected(Manager *m) { assert(m); /* Return true when the manager is sending a request, resolving a server name, or @@ -1052,11 +1052,15 @@ static int manager_network_event_handler(sd_event_source *s, int fd, uint32_t re connected = manager_is_connected(m); if (connected && !online) { - log_info("No network connectivity, watching for changes."); + /* When m->talking is false, we have not received any responses from the server, + * and it is not necessary to log about disconnection. */ + log_full(m->talking ? LOG_INFO : LOG_DEBUG, + "No network connectivity, watching for changes."); manager_disconnect(m); } else if ((!connected || changed) && online) { - log_info("Network configuration changed, trying to establish connection."); + log_full(connected ? LOG_DEBUG : LOG_INFO, + "Network configuration changed, trying to establish connection."); if (m->current_server_address) r = manager_begin(m); diff --git a/src/timesync/timesyncd-manager.h b/src/timesync/timesyncd-manager.h index 4313d72ce45..68fc8f8853a 100644 --- a/src/timesync/timesyncd-manager.h +++ b/src/timesync/timesyncd-manager.h @@ -131,7 +131,6 @@ void manager_flush_runtime_servers(Manager *m); int manager_connect(Manager *m); void manager_disconnect(Manager *m); -bool manager_is_connected(Manager *m); int manager_setup_save_time_event(Manager *m);