mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 17:45:07 -05:00
sources: reselect after resetting selected source
Avoid showing in the sources report a selected source which has no samples (e.g. after replacement).
This commit is contained in:
@@ -357,6 +357,9 @@ SRC_ResetInstance(SRC_Instance instance)
|
||||
memset(&instance->sel_info, 0, sizeof (instance->sel_info));
|
||||
|
||||
SST_ResetInstance(instance->stats);
|
||||
|
||||
if (selected_source_index == instance->index)
|
||||
SRC_SelectSource(NULL);
|
||||
}
|
||||
|
||||
/* ================================================== */
|
||||
|
||||
Reference in New Issue
Block a user