Feat: ensure gotty shutdown if main command exit

This commit is contained in:
oxedions 2022-04-07 09:48:07 +02:00
parent 89a27a859e
commit 9656d80c2b

View file

@ -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()
}
}()