mirror of
https://github.com/ehang-io/nps.git
synced 2026-11-02 01:37:04 +08:00
小bug
This commit is contained in:
1 parent
69ad2d3761
commit
478226e479
1 file changed
+1
-1
+1
-1
@@ -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]
|
||||||
|
|||||||
Reference in new issue
Block a user