diff --git a/nat.go b/nat.go index a260679..6d295e6 100644 --- a/nat.go +++ b/nat.go @@ -85,10 +85,7 @@ func DiscoverNATs(ctx context.Context) <-chan NAT { } // DiscoverGateway attempts to find a gateway device. -func DiscoverGateway() (NAT, error) { - ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) - defer cancel() - +func DiscoverGateway(ctx context.Context) (NAT, error) { var nats []NAT for nat := range DiscoverNATs(ctx) { nats = append(nats, nat)