mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
增加消息异常
This commit is contained in:
@@ -7,7 +7,7 @@ const (
|
|||||||
Sys_Event_Tcp_Connected EventType= 1
|
Sys_Event_Tcp_Connected EventType= 1
|
||||||
Sys_Event_Tcp_DisConnected EventType= 2
|
Sys_Event_Tcp_DisConnected EventType= 2
|
||||||
Sys_Event_Tcp_RecvPack EventType = 3
|
Sys_Event_Tcp_RecvPack EventType = 3
|
||||||
|
Sys_Event_Tcp_PackException EventType = 4
|
||||||
|
|
||||||
Sys_Event_User_Define EventType = 1000
|
Sys_Event_User_Define EventType = 1000
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -122,7 +122,8 @@ func (slf *Client) Run() {
|
|||||||
}
|
}
|
||||||
data,err:=slf.tcpService.process.Unmarshal(bytes)
|
data,err:=slf.tcpService.process.Unmarshal(bytes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Debug("process.Unmarshal is error:%+v",err)
|
slf.tcpService.GetEventReciver().NotifyEvent(&event.Event{Type:event.Sys_Event_Tcp_RecvPack,Data:&TcpPack{ClientId:slf.id,Data:bytes}})
|
||||||
|
//log.Debug("process.Unmarshal is error:%+v",err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user