mirror of
https://github.com/AdguardTeam/dnsproxy.git
synced 2026-10-12 02:01:26 +00:00
Merge in GO/dnsproxy from AGDNS-3952-udp-id to master Squashed commit of the following: commit e74206b1c4ad9a82580ab01a774ee1b0350301ca Author: Ainar Garipov <[email protected]> Date: Tue Apr 28 19:43:03 2026 +0300 upstream: imp code commit c281d1ad5d85abffde07c87f20b11ff08d5ac8bb Author: Ainar Garipov <[email protected]> Date: Tue Apr 28 17:27:08 2026 +0300 all: imp code commit 629588a962aa497d397dba479c6cdc3842dc1f94 Author: Ainar Garipov <[email protected]> Date: Tue Apr 28 14:17:51 2026 +0300 all: set id in udp when unset; go fix
24 lines
520 B
Go
24 lines
520 B
Go
//go:build !plan9
|
|
|
|
package proxy
|
|
|
|
import (
|
|
"syscall"
|
|
|
|
"github.com/AdguardTeam/golibs/errors"
|
|
)
|
|
|
|
// isEPIPE checks if the underlying error is EPIPE. syscall.EPIPE exists on all
|
|
// OSes except for Plan 9. Validate with:
|
|
//
|
|
// $ for os in $(go tool dist list | cut -d / -f 1 | sort -u)
|
|
// do
|
|
// echo -n "$os"
|
|
// env GOOS="$os" go doc syscall.EPIPE | grep -F -e EPIPE
|
|
// done
|
|
//
|
|
// For the Plan 9 version see ./errors_plan9.go.
|
|
func isEPIPE(err error) (ok bool) {
|
|
return errors.Is(err, syscall.EPIPE)
|
|
}
|