mirror of
https://github.com/yudai/gotty.git
synced 2025-12-24 11:20:13 +01:00
Feat: ensure gotty shutdown if main command exit
This commit is contained in:
parent
89a27a859e
commit
9656d80c2b
1 changed files with 1 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ func (server *Server) generateHandleWS(ctx context.Context, cancel context.Cance
|
|||
closeReason, r.RemoteAddr, num, server.options.MaxConnection,
|
||||
)
|
||||
|
||||
if server.options.Once {
|
||||
if (server.options.Once) || (closeReason == "local command") {
|
||||
cancel()
|
||||
}
|
||||
}()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue