do the reset after recovery finished

This commit is contained in:
Alex
2025-02-07 16:03:36 -05:00
committed by Cuong Manh Le
parent d37d0e942c
commit 60e65a37a6
2 changed files with 4 additions and 57 deletions
+3
View File
@@ -1429,6 +1429,9 @@ func (p *prog) handleRecovery(reason RecoveryReason) {
}
mainLog.Load().Info().Msgf("Upstream %q recovered; re-applying DNS settings", recovered)
// reset the upstream failure count and down state
p.um.reset(recovered)
// For network changes we also reinitialize the OS resolver.
if reason == RecoveryReasonNetworkChange {
ns := ctrld.InitializeOsResolver(true)