aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discv5/udp.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/discv5/udp.go')
-rw-r--r--p2p/discv5/udp.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/p2p/discv5/udp.go b/p2p/discv5/udp.go
index 46d3200bf..f86fb4d81 100644
--- a/p2p/discv5/udp.go
+++ b/p2p/discv5/udp.go
@@ -385,7 +385,7 @@ func (t *udp) readLoop() {
buf := make([]byte, 1280)
for {
nbytes, from, err := t.conn.ReadFromUDP(buf)
- if isTemporaryError(err) {
+ if netutil.IsTemporaryError(err) {
// Ignore temporary read errors.
glog.V(logger.Debug).Infof("Temporary read error: %v", err)
continue
@@ -398,13 +398,6 @@ func (t *udp) readLoop() {
}
}
-func isTemporaryError(err error) bool {
- tempErr, ok := err.(interface {
- Temporary() bool
- })
- return ok && tempErr.Temporary() || isPacketTooBig(err)
-}
-
func (t *udp) handlePacket(from *net.UDPAddr, buf []byte) error {
pkt := ingressPacket{remoteAddr: from}
if err := decodePacket(buf, &pkt); err != nil {