This commit is contained in:
刘河 2019-01-11 10:44:13 +08:00
parent 69ad2d3761
commit 478226e479

View File

@ -141,7 +141,7 @@ func NewConn(conn net.Conn) *Conn {
//读取指定长度内容
func (s *Conn) ReadLen(cLen int) ([]byte, error) {
if cLen > 65535 {
if cLen > 65536 {
return nil, errors.New("长度错误")
}
buf := bufPool.Get().([]byte)[:cLen]