From b1654595ce4d81b579f186c54c14ee648434ce58 Mon Sep 17 00:00:00 2001 From: esrrhs Date: Tue, 8 Jan 2019 11:13:41 +0800 Subject: [PATCH] fix --- client.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index ac3deb9..af806f8 100644 --- a/client.go +++ b/client.go @@ -202,6 +202,10 @@ func (p *Client) processPacket(packet *Packet) { return } + if packet.echoId != p.id { + return + } + if packet.msgType == PING { t := time.Time{} t.UnmarshalBinary(packet.data) @@ -214,7 +218,7 @@ func (p *Client) processPacket(packet *Packet) { clientConn := p.localIdToConnMap[packet.id] if clientConn == nil { - fmt.Printf("processPacket no conn %s \n", packet.id) + //fmt.Printf("processPacket no conn %s \n", packet.id) return }