mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-01-01 15:05:35 -05:00
use stream instead of raw chan
This commit is contained in:
@@ -33,15 +33,16 @@ func (this *OutboundConnectionHandler) Dispatch(packet v2net.Packet, ray ray.Out
|
||||
writeFinish.Lock()
|
||||
|
||||
go func() {
|
||||
v2io.ChanToRawWriter(this.ConnOutput, input)
|
||||
v2io.Pipe(input, v2io.NewAdaptiveWriter(this.ConnOutput))
|
||||
writeFinish.Unlock()
|
||||
input.Release()
|
||||
}()
|
||||
|
||||
writeFinish.Lock()
|
||||
}
|
||||
|
||||
v2io.RawReaderToChan(output, this.ConnInput)
|
||||
close(output)
|
||||
v2io.Pipe(v2io.NewAdaptiveReader(this.ConnInput), output)
|
||||
output.Close()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user