diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-20 17:09:11 +0200 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2022-04-20 17:09:11 +0200 |
| commit | 7c284019f1e48ddd37b0f047b50564f069caf379 (patch) | |
| tree | fcce16585d35631d058296fd31455371250b4f9b /src | |
| parent | 0e46f074570b066194a0b1b958b0a90c3eec6ca6 (diff) | |
State: Check if we are Deregistered before initializing FSM
Diffstat (limited to 'src')
| -rw-r--r-- | src/state.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/state.go b/src/state.go index d8c0075..121ef6d 100644 --- a/src/state.go +++ b/src/state.go @@ -28,10 +28,10 @@ type VPNState struct { } func (state *VPNState) Register(name string, directory string, stateCallback func(string, string, string), debug bool) error { - state.InitializeFSM() if !state.InState(DEREGISTERED) { return errors.New("app already registered") } + state.InitializeFSM() state.Name = name state.ConfigDirectory = directory state.StateCallback = stateCallback |
