tracker/udp_test.go | 3 ++- diff --git a/tracker/udp_test.go b/tracker/udp_test.go index 5b12bc6beac079f2caee692c159122590ce0f7cd..3a22aee2d114ba4819a518d69cde613176334f61 100644 --- a/tracker/udp_test.go +++ b/tracker/udp_test.go @@ -15,6 +15,7 @@ "testing" "github.com/anacrolix/dht/krpc" _ "github.com/anacrolix/envpprof" + "github.com/pkg/errors" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -141,7 +142,7 @@ TrackerUrl: trackers[0], Request: req, }.Do() // Skip any net errors as we don't control the server. - if _, ok := err.(net.Error); ok { + if _, ok := errors.Cause(err).(net.Error); ok { t.Skip(err) } require.NoError(t, err)