errors_errno.go 564 B

12345678910111213141516171819
  1. //go:build aix || darwin || dragonfly || freebsd || linux || nacl || nacljs || netbsd || openbsd || solaris || windows
  2. // +build aix darwin dragonfly freebsd linux nacl nacljs netbsd openbsd solaris windows
  3. // For systems having syscall.Errno.
  4. // Update build targets by following command:
  5. // $ grep -R ECONN $(go env GOROOT)/src/syscall/zerrors_*.go \
  6. // | tr "." "_" | cut -d"_" -f"2" | sort | uniq
  7. package dtls
  8. import (
  9. "errors"
  10. "os"
  11. "syscall"
  12. )
  13. func isOpErrorTemporary(err *os.SyscallError) bool {
  14. return errors.Is(err.Err, syscall.ECONNREFUSED)
  15. }