fix: add info log indicating that hole punching has been disabled when it is left as the default but the relay client is disabled.
Adin Schmahmann committed
May 3, 2022 at 14:23 UTC
185971b259d3e53ab5b19ac4021e3059961fcf28
1 file changed
+2
core/node/libp2p/relay.go
+2
@@ -75,6 +75,8 @@ func HolePunching(flag config.Flag, hasRelayClient bool) func() (opts Libp2pOpts
75
// otherwise just silently disable hole punching
76
if flag != config.Default {
77
log.Fatal("Failed to enable `Swarm.EnableHolePunching`, it requires `Swarm.RelayClient.Enabled` to be true.")
78
+ } else {
79
+ log.Info("HolePunching has been disabled due to the RelayClient being disabled.")
80
}
81
return
82
}