Fix small bug, to not response on Empty Packet

This commit is contained in:
giongto35 2021-02-16 22:30:43 +08:00 committed by Sergey Stepanov
parent c01ddc869b
commit 5de666d4af
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B

View file

@ -111,8 +111,8 @@ func (c *Client) Receive(id string, f PacketHandler) {
req.PacketID = response.PacketID
req.SessionID = response.SessionID
// Skip rqeuest if it is EmptyPacket
if req == EmptyPacket {
// Skip response if it is EmptyPacket
if response == EmptyPacket {
return
}
resp, err := json.Marshal(req)