修复一个内存泄漏问题

This commit is contained in:
langhuihui
2020-09-30 22:04:23 +08:00
parent 79070d801e
commit fb17dd8e87

View File

@@ -439,7 +439,7 @@ func (conn *NetConnection) readChunk() (msg *Chunk, err error) {
}
msgLen := int(chunkHead.MessageLength)
if !ok {
currentBody = (pool.GetSlice(msgLen))[:0]
currentBody = make([]byte,0,msgLen)
conn.incompleteRtmpBody[ChunkStreamID] = currentBody
}