mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-30 05:55:20 -05:00
fix error detection for pipeline
This commit is contained in:
@@ -3,6 +3,7 @@ package buf
|
||||
import (
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
|
||||
"v2ray.com/core/common"
|
||||
"v2ray.com/core/common/errors"
|
||||
@@ -22,7 +23,7 @@ func ReadAllToMultiBuffer(reader io.Reader) (MultiBuffer, error) {
|
||||
mb.Append(b)
|
||||
}
|
||||
if err != nil {
|
||||
if errors.Cause(err) == io.EOF {
|
||||
if errors.Cause(err) == io.EOF || errors.Cause(err) == os.ErrClosed {
|
||||
return mb, nil
|
||||
}
|
||||
mb.Release()
|
||||
|
||||
Reference in New Issue
Block a user