log print size

This commit is contained in:
wangchuxiao 2022-11-18 10:45:48 +08:00
parent 4b0a95fc1b
commit 68ad1e9645

View File

@ -106,6 +106,7 @@ func (ws *WServer) readMsg(conn *UserConn) {
ws.delUserConn(conn)
return
}
log.NewDebug("", "size", utils.ByteSize(uint64(len(msg))))
if conn.IsCompress {
buff := bytes.NewBuffer(msg)
reader, err := gzip.NewReader(buff)
@ -123,7 +124,6 @@ func (ws *WServer) readMsg(conn *UserConn) {
log.NewWarn("", "reader close failed")
}
}
log.NewDebug("", "size", utils.ByteSize(uint64(len(msg))))
ws.msgParse(conn, msg)
}
}