23 lines
666 B
Go
Raw Normal View History

2024-01-03 17:57:33 -04:00
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
// SPDX-License-Identifier: MIT
2022-03-10 10:44:48 +01:00
//go:build aix || darwin || dragonfly || freebsd || linux || nacl || nacljs || netbsd || openbsd || solaris || windows
// +build aix darwin dragonfly freebsd linux nacl nacljs netbsd openbsd solaris windows
// For systems having syscall.Errno.
// Update build targets by following command:
// $ grep -R ECONN $(go env GOROOT)/src/syscall/zerrors_*.go \
// | tr "." "_" | cut -d"_" -f"2" | sort | uniq
package dtls
import (
2024-01-03 17:57:33 -04:00
"errors"
2022-03-10 10:44:48 +01:00
"os"
"syscall"
)
func isOpErrorTemporary(err *os.SyscallError) bool {
2024-01-03 17:57:33 -04:00
return errors.Is(err.Err, syscall.ECONNREFUSED)
2022-03-10 10:44:48 +01:00
}