mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-05 04:47:40 +03:00
Fix broken pipe check
This commit is contained in:
parent
cb7239c6a7
commit
3d74b823ed
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
|
||||
"github.com/sagernet/sing/common"
|
||||
F "github.com/sagernet/sing/common/format"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
type Handler interface {
|
||||
|
@ -49,5 +50,5 @@ func IsCanceled(err error) bool {
|
|||
}
|
||||
|
||||
func IsClosed(err error) bool {
|
||||
return IsMulti(err, io.EOF, net.ErrClosed, io.ErrClosedPipe, os.ErrClosed)
|
||||
return IsMulti(err, io.EOF, net.ErrClosed, io.ErrClosedPipe, os.ErrClosed, syscall.EPIPE)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue