diff --git a/src/msg_gateway/gate/logic.go b/src/msg_gateway/gate/logic.go index 0d1a2b5e9..389a38a19 100644 --- a/src/msg_gateway/gate/logic.go +++ b/src/msg_gateway/gate/logic.go @@ -168,7 +168,7 @@ func (ws *WServer) pullMsgReq(conn *UserConn, m *Req) { } } func (ws *WServer) pullMsgBySeqListReq(conn *UserConn, m *Req) { - log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq", m) + log.NewInfo(m.OperationID, "Ws call success to pullMsgBySeqListReq", m.SendID) reply := new(pbChat.PullMessageResp) isPass, errCode, errMsg, data := ws.argsValidate(m, constant.WSPullMsgBySeqList) if isPass { diff --git a/src/msg_gateway/gate/ws_server.go b/src/msg_gateway/gate/ws_server.go index 122e525cb..cc5ca6db1 100644 --- a/src/msg_gateway/gate/ws_server.go +++ b/src/msg_gateway/gate/ws_server.go @@ -64,7 +64,10 @@ func (ws *WServer) wsHandler(w http.ResponseWriter, r *http.Request) { func (ws *WServer) readMsg(conn *UserConn) { for { - _, msg, err := conn.ReadMessage() + messageType, msg, err := conn.ReadMessage() + if messageType == websocket.PingMessage { + log.NewInfo("", "this is a pingMessage") + } if err != nil { log.ErrorByKv("WS ReadMsg error", "", "userIP", conn.RemoteAddr().String(), "userUid", ws.getUserUid(conn), "error", err) ws.delUserConn(conn)