From 5ac096cc7a454f2d57d33fe732fa39540d3b48ad Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Mon, 12 Sep 2022 07:59:17 +0200 Subject: State: Do not automatically remove servers on a config error This is problematic as we do not want to remove already fully added servers! --- state.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/state.go b/state.go index f059a5d..a0a7b2f 100644 --- a/state.go +++ b/state.go @@ -360,7 +360,6 @@ func (state *VPNState) GetConfigSecureInternet( server, serverErr := state.addSecureInternetHomeServer(orgID) if serverErr != nil { - state.RemoveSecureInternet() state.GoBack() return "", "", &types.WrappedErrorMessage{Message: errorMessage, Err: serverErr} } @@ -421,7 +420,6 @@ func (state *VPNState) GetConfigInstituteAccess(url string, forceTCP bool) (stri server, serverErr := state.addInstituteServer(url) if serverErr != nil { - state.RemoveInstituteAccess(url) state.GoBack() return "", "", &types.WrappedErrorMessage{Message: errorMessage, Err: serverErr} } @@ -435,7 +433,6 @@ func (state *VPNState) GetConfigCustomServer(url string, forceTCP bool) (string, server, serverErr := state.addCustomServer(url) if serverErr != nil { - state.RemoveCustomServer(url) state.GoBack() return "", "", &types.WrappedErrorMessage{Message: errorMessage, Err: serverErr} } -- cgit v1.2.3