diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-03-30 12:03:41 +0200 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2023-09-25 09:43:37 +0200 |
| commit | 00a3eb73b63ec9f02c65a52f1eb9acc7472f96c3 (patch) | |
| tree | c1bbf1b67d9293fa29a7d4c735900c5c00a6a7fd /client | |
| parent | 32e734b4f53595bc0d4fdea4206e852d0848c399 (diff) | |
Client: Remove OpenVPN check for failover and check if in progress
Diffstat (limited to 'client')
| -rw-r--r-- | client/server.go | 16 |
1 files 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) |
