diff options
author | Felix Lange <fjl@twurst.com> | 2016-11-22 01:39:36 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-11-23 05:21:15 +0800 |
commit | ba2884f3431312c616e21f57deeb03a7c4374d57 (patch) | |
tree | 112b5586fe409d5b0a5c02b4c98ebcfab9a0e6b6 /p2p/discover/udp_windows.go | |
parent | 1d80155d5e036a0c10dd456ae2772dfa17338b95 (diff) | |
download | go-tangerine-ba2884f3431312c616e21f57deeb03a7c4374d57.tar go-tangerine-ba2884f3431312c616e21f57deeb03a7c4374d57.tar.gz go-tangerine-ba2884f3431312c616e21f57deeb03a7c4374d57.tar.bz2 go-tangerine-ba2884f3431312c616e21f57deeb03a7c4374d57.tar.lz go-tangerine-ba2884f3431312c616e21f57deeb03a7c4374d57.tar.xz go-tangerine-ba2884f3431312c616e21f57deeb03a7c4374d57.tar.zst go-tangerine-ba2884f3431312c616e21f57deeb03a7c4374d57.zip |
p2p/discover, p2p/discv5: use netutil.IsTemporaryError
Diffstat (limited to 'p2p/discover/udp_windows.go')
-rw-r--r-- | p2p/discover/udp_windows.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/p2p/discover/udp_windows.go b/p2p/discover/udp_windows.go deleted file mode 100644 index 66bbf9597..000000000 --- a/p2p/discover/udp_windows.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2016 The go-ethereum Authors -// This file is part of the go-ethereum library. -// -// The go-ethereum library is free software: you can redistribute it and/or modify -// it under the terms of the GNU Lesser General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// The go-ethereum library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public License -// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>. - -//+build windows - -package discover - -import ( - "net" - "os" - "syscall" -) - -const _WSAEMSGSIZE = syscall.Errno(10040) - -// reports whether err indicates that a UDP packet didn't -// fit the receive buffer. On Windows, WSARecvFrom returns -// code WSAEMSGSIZE and no data if this happens. -func isPacketTooBig(err error) bool { - if opErr, ok := err.(*net.OpError); ok { - if scErr, ok := opErr.Err.(*os.SyscallError); ok { - return scErr.Err == _WSAEMSGSIZE - } - return opErr.Err == _WSAEMSGSIZE - } - return false -} |