From a6ba009120af979fa3871ab17d07e4e6f33a892b Mon Sep 17 00:00:00 2001 From: duanhf2012 Date: Tue, 14 Apr 2020 11:22:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8C=85=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- network/tcp_msg.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/network/tcp_msg.go b/network/tcp_msg.go index cd42234..811837e 100644 --- a/network/tcp_msg.go +++ b/network/tcp_msg.go @@ -133,7 +133,7 @@ func (p *MsgParser) Write(conn *TCPConn, args ...[]byte) error { if p.littleEndian { binary.LittleEndian.PutUint16(msg, uint16(msgLen)) } else { - binary.BigEndian.PutUint16(msg, uint16(msgLen)+uint16(p.lenMsgLen)) + binary.BigEndian.PutUint16(msg, uint16(msgLen)) } case 4: if p.littleEndian {