From f2c53cc7c4df8d6f407029bdfb9cf52b5fc98487 Mon Sep 17 00:00:00 2001 From: oxedions Date: Tue, 9 Jul 2024 16:25:07 +0200 Subject: [PATCH] JAR-8986 --- server/handlers.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/handlers.go b/server/handlers.go index 79854ab..ee019ac 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -9,6 +9,7 @@ import ( "net/http" "net/url" "sync/atomic" + "os" "github.com/gorilla/websocket" "github.com/pkg/errors" @@ -47,7 +48,9 @@ func (server *Server) generateHandleWS(ctx context.Context, cancel context.Cance ) if (server.options.Once) || (closeReason == "local command") { - cancel() + if os.Getenv("JARVICE_GOTTY_DISABLE_AUTO_EXIT") != "True" { + cancel() + } } }()