This commit is contained in:
oxedions 2024-07-09 16:25:07 +02:00
parent 5b767efc74
commit f2c53cc7c4

View file

@ -9,6 +9,7 @@ import (
"net/http" "net/http"
"net/url" "net/url"
"sync/atomic" "sync/atomic"
"os"
"github.com/gorilla/websocket" "github.com/gorilla/websocket"
"github.com/pkg/errors" "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") { if (server.options.Once) || (closeReason == "local command") {
cancel() if os.Getenv("JARVICE_GOTTY_DISABLE_AUTO_EXIT") != "True" {
cancel()
}
} }
}() }()