aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
Diffstat (limited to 'p2p')
-rw-r--r--p2p/nat/nat.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/p2p/nat/nat.go b/p2p/nat/nat.go
index 505a1fc77..42f615f36 100644
--- a/p2p/nat/nat.go
+++ b/p2p/nat/nat.go
@@ -197,11 +197,7 @@ type autodisc struct {
func startautodisc(what string, doit func() Interface) Interface {
// TODO: monitor network configuration and rerun doit when it changes.
- ad := &autodisc{what: what, doit: doit}
- // Start the auto discovery as early as possible so it is already
- // in progress when the rest of the stack calls the methods.
- go ad.wait()
- return ad
+ return &autodisc{what: what, doit: doit}
}
func (n *autodisc) AddMapping(protocol string, extport, intport int, name string, lifetime time.Duration) error {