优化网络层的GC

This commit is contained in:
boyce
2020-10-29 19:40:44 +08:00
parent 54f1db7641
commit 5e30083ce8
6 changed files with 36 additions and 7 deletions

View File

@@ -172,6 +172,7 @@ func (slf *Client) Run() {
break
}
data,err:=slf.tcpService.process.Unmarshal(bytes)
slf.tcpConn.ReleaseReadMsg(bytes)
if err != nil {
slf.tcpService.NotifyEvent(&event.Event{Type:event.Sys_Event_Tcp,Data:&TcpPack{ClientId:slf.id,Type:TPT_UnknownPack,Data:bytes,MsgProcessor:slf.tcpService.process}})
continue