mirror of
https://github.com/yudai/gotty.git
synced 2026-02-28 19:00:18 +01:00
JAR-8986
This commit is contained in:
parent
5b767efc74
commit
f2c53cc7c4
1 changed files with 4 additions and 1 deletions
|
|
@ -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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue