mirror of https://github.com/v2ray/v2ray-core
release buffer on write error
parent
17ea740e7e
commit
e586f3c127
|
@ -20,6 +20,7 @@ func Pipe(reader Reader, writer Writer) error {
|
|||
err = writer.Write(buffer)
|
||||
if err != nil {
|
||||
log.Debug("IO: Pipe exits as ", err)
|
||||
buffer.Release()
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue