Update connection.go

Fixed the bug of being unable to correctly parse the packets
This commit is contained in:
梦凌汐 2024-10-01 19:22:30 +08:00 committed by GitHub
parent 03454839a2
commit f2ffbdf68b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,7 @@ func (c *Connection) readPkg() (pkg, error) {
if rdr.err != nil { if rdr.err != nil {
return p, rdr.err return p, rdr.err
} }
p.Body = body[:read-12] p.Body = body[:read-14]
return p, nil return p, nil
} }