This commit is contained in:
刘河 2019-02-21 10:40:29 +08:00
parent 6fe69bc6b1
commit 934402e97d

View File

@ -200,7 +200,7 @@ func (s *Conn) GetMsgContent(link *Link) (content []byte, err error) {
s.Lock()
defer s.Unlock()
buf := pool.BufPoolCopy.Get().([]byte)
if n, err := s.ReadFrom(buf, link.De, link.Crypt, link.Rate); err == nil && n > 4 {
if n, err := s.ReadFrom(buf, link.De, link.Crypt, link.Rate); err == nil {
content = buf[:n]
}
return