Fix Packet.ReadFrom
1 files changed, 1 insertions(+), 0 deletions(-)

M packet.go
M packet.go +1 -0
@@ 80,6 80,7 @@ func (packet *Packet) ReadFrom(reader io
 	if err = binary.Read(reader, binary.BigEndian, &payloadlen); err != nil {
 		return
 	}
+	n += int64(binary.Size(&payloadlen))
 
 	packet.Payload = packet.buffer[:payloadlen]
 	if payloadlen > 0 {