mirror of
https://github.com/yudai/gotty.git
synced 2026-02-28 10:54:08 +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,
|
closeReason, r.RemoteAddr, num, server.options.MaxConnection,
|
||||||
)
|
)
|
||||||
|
|
||||||
if server.options.Once {
|
if (server.options.Once) || (closeReason == "local command") {
|
||||||
cancel()
|
cancel()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue