2024-05-15 23:15:00 +00:00
|
|
|
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
|
2022-03-10 09:44:48 +00: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-05-15 23:15:00 +00:00
|
|
|
"errors"
|
2022-03-10 09:44:48 +00:00
|
|
|
"os"
|
|
|
|
"syscall"
|
|
|
|
)
|
|
|
|
|
|
|
|
func isOpErrorTemporary(err *os.SyscallError) bool {
|
2024-05-15 23:15:00 +00:00
|
|
|
return errors.Is(err.Err, syscall.ECONNREFUSED)
|
2022-03-10 09:44:48 +00:00
|
|
|
}
|