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

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

No files matched your search

+1 -1
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()))