mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 20:25:07 -05:00
ntp: avoid unnecessary restart of resolving round on refresh
Don't call NSR_ResolveSources() when a resolving round is already started. This cuts the number of calls of the system resolver made due to the refresh command to half.
This commit is contained in:
@@ -1056,7 +1056,10 @@ resolve_source_replacement(SourceRecord *record, int refreshment)
|
|||||||
us->address = *record->remote_addr;
|
us->address = *record->remote_addr;
|
||||||
|
|
||||||
append_unresolved_source(us);
|
append_unresolved_source(us);
|
||||||
NSR_ResolveSources();
|
|
||||||
|
/* Don't restart resolving round if already running */
|
||||||
|
if (!resolving_source)
|
||||||
|
NSR_ResolveSources();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|||||||
Reference in New Issue
Block a user