mirror of
https://github.com/ehang-io/nps.git
synced 2025-07-03 13:10:42 +00:00
小bug
This commit is contained in:
parent
69ad2d3761
commit
478226e479
@ -141,7 +141,7 @@ func NewConn(conn net.Conn) *Conn {
|
|||||||
|
|
||||||
//读取指定长度内容
|
//读取指定长度内容
|
||||||
func (s *Conn) ReadLen(cLen int) ([]byte, error) {
|
func (s *Conn) ReadLen(cLen int) ([]byte, error) {
|
||||||
if cLen > 65535 {
|
if cLen > 65536 {
|
||||||
return nil, errors.New("长度错误")
|
return nil, errors.New("长度错误")
|
||||||
}
|
}
|
||||||
buf := bufPool.Get().([]byte)[:cLen]
|
buf := bufPool.Get().([]byte)[:cLen]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user