mox/vendor/github.com/mjl-/sherpa/isclosed.go
Mechiel Lukkien cb229cb6cf
mox!
2023-01-30 14:27:06 +01:00

13 lines
205 B
Go

//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)
}