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:
@@ -43,7 +43,12 @@ func setDF(rawConn syscall.RawConn) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
func isMsgSizeErr(err error) bool {
|
||||
func isSendMsgSizeErr(err error) bool {
|
||||
// https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2
|
||||
return errors.Is(err, windows.WSAEMSGSIZE)
|
||||
}
|
||||
|
||||
func isRecvMsgSizeErr(err error) bool {
|
||||
// https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2
|
||||
return errors.Is(err, windows.WSAEMSGSIZE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user