diff options
| author | Jeroen Wijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 16:27:25 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-25 16:27:25 +0200 |
| commit | 44df9cb92abe66cf12e887ef19e60a01461b3558 (patch) | |
| tree | c24ba1580a65c681d3dba4d77cd2042803396143 /state.go | |
| parent | ee1c5a9ada755a51efa2fbf054f4382d00c70dee (diff) | |
Tests: Ability to add a custom server and share certificate
We also now do not have to skip verification in the test files
Diffstat (limited to 'state.go')
| -rw-r--r-- | state.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -86,7 +86,11 @@ func (state *VPNState) Connect(url string) (string, error) { return "", errors.New("app not registered") } // New server chosen, ensure the server is fresh - server := state.Servers.EnsureServer(url, &state.FSM, &state.Logger) + server, serverErr := state.Servers.EnsureServer(url, &state.FSM, &state.Logger) + + if serverErr != nil { + return "", serverErr + } // Make sure we are in the chosen state if available state.FSM.GoTransition(internal.CHOSEN_SERVER) // Relogin with oauth |
