修复批量终止在线会话失败的bug

This commit is contained in:
dushixiang
2021-02-23 19:33:11 +08:00
parent 88b0e39f48
commit 87586da40a
3 changed files with 4 additions and 6 deletions

View File

@ -27,7 +27,7 @@ func (r *Tun) Close(code int, reason string) {
ws := r.WebSocket
if ws != nil {
if r.Mode == "guacd" {
err := guacd.NewInstruction("error", reason, strconv.Itoa(code))
err := guacd.NewInstruction("error", "", strconv.Itoa(code))
_ = ws.WriteMessage(websocket.TextMessage, []byte(err.String()))
disconnect := guacd.NewInstruction("disconnect")
_ = ws.WriteMessage(websocket.TextMessage, []byte(disconnect.String()))