build, pmp: Replace fork with upstream for go-nat-pmp and tidy go.mod (#6247)

This commit is contained in:
Simon Frei
2020-01-03 12:39:59 +01:00
committed by Jakob Borg
parent 1e69c31d87
commit 7a8e73d599
3 changed files with 5 additions and 32 deletions

View File

@@ -13,8 +13,8 @@ import (
"strings"
"time"
"github.com/AudriusButkevicius/go-nat-pmp"
"github.com/jackpal/gateway"
"github.com/jackpal/go-nat-pmp"
"github.com/syncthing/syncthing/lib/nat"
)
@@ -34,7 +34,7 @@ func Discover(ctx context.Context, renewal, timeout time.Duration) []nat.Device
l.Debugln("Discovered gateway at", ip)
c := natpmp.NewClient(ip, timeout)
c := natpmp.NewClientWithTimeout(ip, timeout)
// Try contacting the gateway, if it does not respond, assume it does not
// speak NAT-PMP.
_, err = c.GetExternalAddress()