summaryrefslogtreecommitdiff
path: root/state.go
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-18 17:26:45 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-07-18 17:26:45 +0200
commitd3f5d21e8867b2a71b9ba77cb4908988a280f3bc (patch)
treed369bfe7086c6be26b5896426158a25aa8eadaae /state.go
parentd9942036ef3e3eca47213018484fcb695766ec82 (diff)
State: Save the state after retrieving a successful connect config
Diffstat (limited to 'state.go')
-rw-r--r--state.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/state.go b/state.go
index a60b143..66f2de0 100644
--- a/state.go
+++ b/state.go
@@ -133,10 +133,14 @@ func (state *VPNState) getConfig(chosenServer server.Server, forceTCP bool) (str
// Go back
state.GoBack()
return "", "", &types.WrappedErrorMessage{Message: errorMessage, Err: configErr}
- } else {
- state.FSM.GoTransitionWithData(fsm.HAS_CONFIG, state.getServerInfoData(), false)
}
+ // Signal the server display info
+ state.FSM.GoTransitionWithData(fsm.HAS_CONFIG, state.getServerInfoData(), false)
+
+ // Save the config
+ state.Config.Save(&state)
+
return config, configType, nil
}