1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-03 07:45:29 -05:00

release all adaptive readers and writers

This commit is contained in:
v2ray
2016-04-18 19:01:24 +02:00
parent 7768674df8
commit 44bf412dfc
7 changed files with 52 additions and 13 deletions

View File

@@ -219,7 +219,10 @@ func (this *Shadowsocks) handleConnection(conn *hub.TCPConn) {
payload.Release()
writer := crypto.NewCryptionWriter(stream, conn)
v2io.Pipe(ray.InboundOutput(), v2io.NewAdaptiveWriter(writer))
v2writer := v2io.NewAdaptiveWriter(writer)
defer writer.Release()
v2io.Pipe(ray.InboundOutput(), v2writer)
ray.InboundOutput().Release()
}
writeFinish.Unlock()