mirror of https://github.com/v2ray/v2ray-core
parent
0067d3c80f
commit
334b7bf5ed
|
@ -107,7 +107,6 @@ func (p *pipe) writeMultiBufferInternal(mb buf.MultiBuffer) error {
|
|||
defer p.Unlock()
|
||||
|
||||
if err := p.getState(false); err != nil {
|
||||
mb.Release()
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -122,7 +121,11 @@ func (p *pipe) WriteMultiBuffer(mb buf.MultiBuffer) error {
|
|||
|
||||
for {
|
||||
err := p.writeMultiBufferInternal(mb)
|
||||
if err == nil || err != errBufferFull {
|
||||
if err == nil {
|
||||
p.readSignal.Signal()
|
||||
return nil
|
||||
} else if err != errBufferFull {
|
||||
mb.Release()
|
||||
p.readSignal.Signal()
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue