pull/103/head
Gordon 3 years ago
parent 2ad8177e6b
commit 97fa1146b2

@ -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 {

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

Loading…
Cancel
Save