diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/state.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/state.go b/src/state.go index c146e61..a48d13d 100644 --- a/src/state.go +++ b/src/state.go @@ -36,6 +36,14 @@ func (state *VPNState) Register(name string, directory string, stateCallback fun return nil } +func (state *VPNState) Deregister() { + // Close the log file + state.CloseLog() + + // Re-initialize everything + state = &VPNState{} +} + func (state *VPNState) Connect(url string) (string, error) { if state.Server == nil { state.Server = &Server{} |
