forked from quic-go/quic-go
check for WSAEMSGSIZE errors when receiving UDP packets on Windows (#3982)
* check for WSAEMSGSIZE errors when receiving UDP packets on Windows * check EMSGSIZE error on macOS
This commit is contained in:
@@ -47,10 +47,12 @@ func setDF(rawConn syscall.RawConn) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func isMsgSizeErr(err error) bool {
|
||||
func isSendMsgSizeErr(err error) bool {
|
||||
return errors.Is(err, unix.EMSGSIZE)
|
||||
}
|
||||
|
||||
func isRecvMsgSizeErr(error) bool { return false }
|
||||
|
||||
func isAtLeastMacOS11() (bool, error) {
|
||||
uname := &unix.Utsname{}
|
||||
err := unix.Uname(uname)
|
||||
|
||||
Reference in New Issue
Block a user