Maint: improve health code
This commit is contained in:
@@ -9,9 +9,9 @@ import (
|
||||
|
||||
func (s *server) onUnhealthyOpenvpn(ctx context.Context) {
|
||||
s.logger.Info("program has been unhealthy for " +
|
||||
s.openvpn.currentHealthyWait.String() + ": restarting OpenVPN")
|
||||
s.openvpn.healthyWait.String() + ": restarting OpenVPN")
|
||||
_, _ = s.openvpn.looper.ApplyStatus(ctx, constants.Stopped)
|
||||
_, _ = s.openvpn.looper.ApplyStatus(ctx, constants.Running)
|
||||
s.openvpn.currentHealthyWait += s.openvpn.healthyWaitConfig.Addition
|
||||
s.openvpn.healthyTimer = time.NewTimer(s.openvpn.currentHealthyWait)
|
||||
s.openvpn.healthyWait += s.config.OpenVPN.Addition
|
||||
s.openvpn.healthyTimer = time.NewTimer(s.openvpn.healthyWait)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user