summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/server.go16
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)