From d8c7f962e4fe2d4a46f0aeb1c9d9a371d5e41ee0 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 19 Aug 2022 16:32:35 +0200 Subject: 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 --- internal/server/common.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/server') 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 } -- cgit v1.2.3