summaryrefslogtreecommitdiff
path: root/internal/server
diff options
context:
space:
mode:
authorjwijenbergh <jeroenwijenbergh@protonmail.com>2022-08-19 16:32:35 +0200
committerjwijenbergh <jeroenwijenbergh@protonmail.com>2022-08-19 16:32:35 +0200
commitd8c7f962e4fe2d4a46f0aeb1c9d9a371d5e41ee0 (patch)
treed98c682b31cccb975483111e5b817d5c8d029838 /internal/server
parentf81d05226fe61b697baa91e926dd86efad9d8084 (diff)
State + FSM: Properly handle the disconnect flow
- /disconnect is now called - A new state is added (DISCONNECTING) that waits for the disconnect to complete - A helper function is exposed (InFSMState) that can be used by clients to see in which state they are in
Diffstat (limited to 'internal/server')
-rw-r--r--internal/server/common.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/server/common.go b/internal/server/common.go
index 7ee8be6..56c8af0 100644
--- a/internal/server/common.go
+++ b/internal/server/common.go
@@ -523,6 +523,10 @@ func GetConfig(server Server, forceTCP bool) (string, string, error) {
return getConfigWithProfile(server, forceTCP)
}
+func Disconnect(server Server) {
+ APIDisconnect(server)
+}
+
type ServerGetCurrentProfileNotFoundError struct {
ProfileID string
}