Maint: rename health OpenVPN names to VPN
- `HEALTH_OPENVPN_DURATION_INITIAL` renamed to `HEALTH_VPN_DURATION_INITIAL` with retro-compatiblity - `HEALTH_OPENVPN_DURATION_ADDITION` renamed to `HEALTH_VPN_DURATION_ADDITION` with retro-compatiblity
This commit is contained in:
@@ -14,11 +14,11 @@ type vpnHealth struct {
|
||||
healthyTimer *time.Timer
|
||||
}
|
||||
|
||||
func (s *Server) onUnhealthyOpenvpn(ctx context.Context) {
|
||||
func (s *Server) onUnhealthyVPN(ctx context.Context) {
|
||||
s.logger.Info("program has been unhealthy for " +
|
||||
s.vpn.healthyWait.String() + ": restarting OpenVPN")
|
||||
s.vpn.healthyWait.String() + ": restarting VPN")
|
||||
_, _ = s.vpn.looper.ApplyStatus(ctx, constants.Stopped)
|
||||
_, _ = s.vpn.looper.ApplyStatus(ctx, constants.Running)
|
||||
s.vpn.healthyWait += s.config.OpenVPN.Addition
|
||||
s.vpn.healthyWait += s.config.VPN.Addition
|
||||
s.vpn.healthyTimer = time.NewTimer(s.vpn.healthyWait)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user