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:
parent
6e5513c80b
commit
863866354d
1 changed files with 4 additions and 1 deletions
|
@ -1056,6 +1056,9 @@ 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);
|
||||||
|
|
||||||
|
/* Don't restart resolving round if already running */
|
||||||
|
if (!resolving_source)
|
||||||
NSR_ResolveSources();
|
NSR_ResolveSources();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue