0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-12 11:29:36 +03:00

Fix buffer.UDP destination override (#2356)

This commit is contained in:
dyhkwong
2023-08-29 15:12:36 +08:00
committed by GitHub
parent e013dce1df
commit b8bd243df5
6 changed files with 75 additions and 94 deletions

View File

@ -24,7 +24,6 @@ const (
type pipeOption struct {
limit int32 // maximum buffer size in bytes
discardOverflow bool
onTransmission func(buffer buf.MultiBuffer) buf.MultiBuffer
}
func (o *pipeOption) isFull(curSize int32) bool {
@ -141,10 +140,6 @@ func (p *pipe) WriteMultiBuffer(mb buf.MultiBuffer) error {
return nil
}
if p.option.onTransmission != nil {
mb = p.option.onTransmission(mb)
}
for {
err := p.writeMultiBufferInternal(mb)
if err == nil {