diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-12 14:21:58 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-07-12 14:21:58 +0200 |
| commit | f287501fde1be3bd7cb2bc2c163d309738e507a0 (patch) | |
| tree | b20a2489a2b8fd1f86b9e5446f9813b123caeab4 /state.go | |
| parent | 3dc35af5e0b194c0f23b6b8cfd24337a2861380a (diff) | |
State + FSM: Implement a loading server state
Diffstat (limited to 'state.go')
| -rw-r--r-- | state.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 { |
