mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 14:38:09 +02:00
dns: fail the plugin when the rate limiter hits
If the child is respawning too fast, consider the plugin failed so that upstream servers are written to resolv.conf until the plugin gets restarted after the delay.
This commit is contained in:
parent
f2a2012733
commit
e45636659b
1 changed files with 1 additions and 0 deletions
|
|
@ -1608,6 +1608,7 @@ plugin_child_quit (NMDnsPlugin *plugin, int exit_status, gpointer user_data)
|
|||
} else {
|
||||
priv->plugin_ratelimit.num_restarts++;
|
||||
if (priv->plugin_ratelimit.num_restarts > PLUGIN_RATELIMIT_BURST) {
|
||||
plugin_failed (plugin, self);
|
||||
_LOGW ("plugin %s child respawning too fast, delaying update for %u seconds",
|
||||
nm_dns_plugin_get_name (plugin), PLUGIN_RATELIMIT_DELAY);
|
||||
priv->plugin_ratelimit.timer = g_timeout_add_seconds (PLUGIN_RATELIMIT_DELAY,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue