Use []byte in pool instead of buffer

This commit is contained in:
V2Ray committed 2015-10-08 17:41:38 +02:00
1 parent 472cf7f523
commit 3cb1951dfc
8 files changed
+38 -44

No files matched your search

-2
View File
@@ -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