Commit c7df4bed authored by lizhixin.lzx's avatar lizhixin.lzx

remove read buffer collection

parent 917228c6
...@@ -607,12 +607,10 @@ func (s *session) handleTCPPackage() error { ...@@ -607,12 +607,10 @@ func (s *session) handleTCPPackage() error {
bufp = gxbytes.GetBytes(maxReadBufLen) bufp = gxbytes.GetBytes(maxReadBufLen)
buf = *bufp buf = *bufp
// pktBuf = new(bytes.Buffer) pktBuf = new(bytes.Buffer)
pktBuf = gxbytes.GetBytesBuffer()
defer func() { defer func() {
gxbytes.PutBytes(bufp) gxbytes.PutBytes(bufp)
gxbytes.PutBytesBuffer(pktBuf)
}() }()
conn = s.Connection.(*gettyTCPConn) conn = s.Connection.(*gettyTCPConn)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment