fix(socket): 修复TCP数据处理和编解码逻辑
移除调试日志注释,修正socket编解码器中的数据丢弃逻辑。 更新TomeeSocketCodec.Decode方法,确保正确处理数据包长度并丢弃已读取的数据。
This commit is contained in:
@@ -175,6 +175,7 @@ func (s *Server) handleTcp(conn gnet.Conn) (action gnet.Action) {
|
||||
|
||||
if data != nil {
|
||||
//client := conn.RemoteAddr().String()
|
||||
//cool.Loger.Debug(context.Background(), "数据", hex.EncodeToString(data))
|
||||
_ = s.workerPool.Submit(func() { //TODO 这里可能存在顺序执行问题,待修复
|
||||
//todo 这里待实现注入player实体
|
||||
s.handler.Handle(conn, data)
|
||||
|
||||
Reference in New Issue
Block a user