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:
@@ -23,7 +23,7 @@ func (s *Server) runHealthcheckLoop(ctx context.Context, done chan<- struct{}) {
|
||||
if previousErr != nil && err == nil {
|
||||
s.logger.Info("healthy!")
|
||||
s.vpn.healthyTimer.Stop()
|
||||
s.vpn.healthyWait = s.config.OpenVPN.Initial
|
||||
s.vpn.healthyWait = s.config.VPN.Initial
|
||||
} else if previousErr == nil && err != nil {
|
||||
s.logger.Info("unhealthy: " + err.Error())
|
||||
s.vpn.healthyTimer.Stop()
|
||||
@@ -40,7 +40,7 @@ func (s *Server) runHealthcheckLoop(ctx context.Context, done chan<- struct{}) {
|
||||
return
|
||||
case <-timer.C:
|
||||
case <-s.vpn.healthyTimer.C:
|
||||
s.onUnhealthyOpenvpn(ctx)
|
||||
s.onUnhealthyVPN(ctx)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user