close message打日志

pull/23/head
taoshihan1991 4 years ago
parent 9ea47d3319
commit 2e617358fd

@ -263,10 +263,10 @@ func SendCloseMessageV2(c *gin.Context) {
Data: visitorId, Data: visitorId,
} }
str, _ := json.Marshal(msg) str, _ := json.Marshal(msg)
if err := oldUser.Conn.WriteMessage(websocket.TextMessage, str); err != nil { err := oldUser.Conn.WriteMessage(websocket.TextMessage, str)
oldUser.Conn.Close() oldUser.Conn.Close()
delete(ws.ClientList, visitorId) delete(ws.ClientList, visitorId)
} tools.Logger().Println("close_message", oldUser, err)
} }
c.JSON(200, gin.H{ c.JSON(200, gin.H{
"code": 200, "code": 200,

Loading…
Cancel
Save