summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-12 14:21:58 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-12 14:21:58 +0200
commitf287501fde1be3bd7cb2bc2c163d309738e507a0 (patch)
treeb20a2489a2b8fd1f86b9e5446f9813b123caeab4 /state.go
parent3dc35af5e0b194c0f23b6b8cfd24337a2861380a (diff)
State + FSM: Implement a loading server state
Diffstat (limited to 'state.go')
-rw-r--r--state.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/state.go b/state.go
index e3608ac..9522396 100644
--- a/state.go
+++ b/state.go
@@ -194,6 +194,7 @@ func (state *VPNState) addSecureInternetHomeServer(orgID string) (server.Server,
func (state *VPNState) GetConfigSecureInternet(orgID string, forceTCP bool) (string, string, error) {
errorMessage := fmt.Sprintf("failed getting a configuration for Secure Internet organization %s", orgID)
+ state.FSM.GoTransition(fsm.LOADING_SERVER)
server, serverErr := state.addSecureInternetHomeServer(orgID)
if serverErr != nil {
@@ -242,6 +243,7 @@ func (state *VPNState) addCustomServer(url string) (server.Server, error) {
func (state *VPNState) GetConfigInstituteAccess(url string, forceTCP bool) (string, string, error) {
errorMessage := fmt.Sprintf("failed getting a configuration for Institute Access %s", url)
+ state.FSM.GoTransition(fsm.LOADING_SERVER)
server, serverErr := state.addInstituteServer(url)
if serverErr != nil {
@@ -253,6 +255,7 @@ func (state *VPNState) GetConfigInstituteAccess(url string, forceTCP bool) (stri
func (state *VPNState) GetConfigCustomServer(url string, forceTCP bool) (string, string, error) {
errorMessage := fmt.Sprintf("failed getting a configuration for custom server %s", url)
+ state.FSM.GoTransition(fsm.LOADING_SERVER)
server, serverErr := state.addCustomServer(url)
if serverErr != nil {