mox/vendor/github.com/mjl-/sherpa/isclosed.go

14 lines
205 B
Go
Raw Normal View History

2023-01-30 16:27:06 +03:00
//go:build !plan9
// +build !plan9
package sherpa
import (
"errors"
"syscall"
)
func isConnectionClosed(err error) bool {
return errors.Is(err, syscall.EPIPE) || errors.Is(err, syscall.ECONNRESET)
}