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
17 lines
546 B
Go
17 lines
546 B
Go
//go:build plan9
|
|
|
|
package proxy
|
|
|
|
import "strings"
|
|
|
|
// isEPIPE checks if the underlying error is EPIPE. Plan 9 relies on error
|
|
// strings instead of error codes. I couldn't find the exact constant with the
|
|
// text returned by a write on a closed socket, but it seems to be "sys: write
|
|
// on closed pipe". See Plan 9's "man 2 notify".
|
|
//
|
|
// We don't currently support Plan 9, so it's not critical, but when we do, this
|
|
// needs to be rechecked.
|
|
func isEPIPE(err error) (ok bool) {
|
|
return strings.Contains(err.Error(), "write on closed pipe")
|
|
}
|