summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2023-01-12 18:41:37 +0100
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2023-01-12 21:34:00 +0100
commit724b305dcb57ccbaa13b476d08a03c32ccd1b4ed (patch)
tree8d9f27770b8d70fa728c0a472fe6e0289171184e /client
parent07b3361d998c9b653f39d382da04914abcb00296 (diff)
Failover: Return early by waiting for a single pong
Diffstat (limited to 'client')
-rw-r--r--client/server.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/client/server.go b/client/server.go
index c136913..bc6b1fe 100644
--- a/client/server.go
+++ b/client/server.go
@@ -624,12 +624,7 @@ func (c *Client) StartFailover(gateway string, wgMTU int, readRxBytes func() (in
return false, errors.New("Profile does not support OpenVPN fallback")
}
- monitor, monitorErr := failover.New(readRxBytes, c.Logger)
- if monitorErr != nil {
- return false, monitorErr
- }
- // Initialize the client's monitor
- c.Failover = monitor
+ c.Failover = failover.New(readRxBytes, c.Logger)
return c.Failover.Start(gateway, wgMTU)
}