mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-03 08:23:04 +00:00
Use []byte in pool instead of buffer
This commit is contained in:
1 parent
472cf7f523
commit
3cb1951dfc
8 files changed
+38
-44
No files matched your search
@@ -36,7 +36,6 @@ func (vconn *FreedomConnection) Dispatch(firstPacket v2net.Packet, ray core.Outb
|
||||
if chunk := firstPacket.Chunk(); chunk != nil {
|
||||
conn.Write(chunk.Value)
|
||||
chunk.Release()
|
||||
chunk = nil
|
||||
}
|
||||
|
||||
if !firstPacket.MoreChunks() {
|
||||
@@ -74,7 +73,6 @@ func dumpOutput(conn net.Conn, output chan<- *alloc.Buffer, finish *sync.Mutex,
|
||||
output <- response
|
||||
} else {
|
||||
response.Release()
|
||||
response = nil
|
||||
}
|
||||
if err != nil {
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user