summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroenwijenbergh@protonmail.com>2022-04-25 17:50:28 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-04-25 17:50:28 +0200
commitfeb52c57d4d8301ba4b2bce5faab4d65f344ea8f (patch)
treeb0039d0d1f898d065f3362afeb7a5f7a5b69547d
parentb7c58415cd2de0fc9771dc4a49382fc62aefa7e8 (diff)
Deregister: Completely empty out the state
This is so that the only settings that are saved are in the config
-rw-r--r--state.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/state.go b/state.go
index 6f71cb3..249adc3 100644
--- a/state.go
+++ b/state.go
@@ -76,8 +76,8 @@ func (state *VPNState) Deregister() error {
// Save the config
state.Config.Save(&state)
- // Empty out fsm
- state.FSM = internal.FSM{}
+ // Empty out the state
+ state = &VPNState{}
return nil
}