This commit is contained in:
esrrhs 2018-12-20 14:18:08 +08:00
parent ab0935816d
commit d7a5a8d9af

View File

@ -165,6 +165,10 @@ func (p *Client) Accept() error {
func (p *Client) processPacket(packet *Packet) {
if packet.rproto != 0 {
return
}
if packet.msgType == PING {
t := time.Time{}
t.UnmarshalBinary(packet.data)
@ -174,10 +178,6 @@ func (p *Client) processPacket(packet *Packet) {
return
}
if packet.rproto != 0 {
return
}
//fmt.Printf("processPacket %s %s %d\n", packet.id, packet.src.String(), len(packet.data))
clientConn := p.localIdToConnMap[packet.id]