Jelajahi Sumber

Move fallbacks at the end

Ettore Di Giacinto 4 tahun lalu
induk
melakukan
eeb466a786
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      pkg/edgevpn/connection.go

+ 2 - 1
pkg/edgevpn/connection.go

@@ -20,7 +20,6 @@ var defaultLibp2pOptions = []libp2p.Option{
 	libp2p.EnableAutoRelay(),
 	libp2p.EnableNATService(),
 	libp2p.NATPortMap(),
-	libp2p.FallbackDefaults,
 }
 
 func (e *EdgeVPN) Host() host.Host {
@@ -80,6 +79,8 @@ func (e *EdgeVPN) genHost(ctx context.Context) (host.Host, error) {
 		opts = append(opts, libp2p.NoSecurity)
 	}
 
+	opts = append(opts, libp2p.FallbackDefaults)
+
 	return libp2p.New(ctx, opts...)
 }