From 00a3eb73b63ec9f02c65a52f1eb9acc7472f96c3 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Thu, 30 Mar 2023 12:03:41 +0200 Subject: Client: Remove OpenVPN check for failover and check if in progress --- client/server.go | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/client/server.go b/client/server.go index 7a14d00..8890645 100644 --- a/client/server.go +++ b/client/server.go @@ -684,21 +684,9 @@ func (c *Client) SetProfileID(profileID string) (err error) { } func (c *Client) StartFailover(gateway string, wgMTU int, readRxBytes func() (int64, error)) (bool, error) { - currentServer, currentServerErr := c.Servers.GetCurrentServer() - if currentServerErr != nil { - return false, currentServerErr + if c.Failover != nil { + return false, errors.New("another failover process is already started") } - - // Check if the current profile supports OpenVPN - profile, profileErr := server.CurrentProfile(currentServer) - if profileErr != nil { - return false, profileErr - } - - if !profile.SupportsOpenVPN() { - return false, errors.New("Profile does not support OpenVPN fallback") - } - c.Failover = failover.New(readRxBytes) return c.Failover.Start(gateway, wgMTU) -- cgit v1.2.3