From 0f19807e16bf558449d5f6b7b51fe1c5dfbc9ece Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 2 Jul 2020 13:28:33 +0100 Subject: [PATCH] Don't call createSession twice --- src/yggdrasil/api.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/yggdrasil/api.go b/src/yggdrasil/api.go index 328c1b9e..680ed4a9 100644 --- a/src/yggdrasil/api.go +++ b/src/yggdrasil/api.go @@ -235,9 +235,6 @@ func (c *Core) PacketConn() *PacketConn { // Resolve takes a masked node ID and performs a search, returning the complete // node ID and the node's public key. func (c *Core) Resolve(nodeID, nodeMask *crypto.NodeID) (fullNodeID *crypto.NodeID, boxPubKey *crypto.BoxPubKey, err error) { - fmt.Println("**** START RESOLVE") - defer fmt.Println("**** END RESOLVE") - done := make(chan struct{}) c.router.Act(c, func() { _, isIn := c.router.searches.searches[*nodeID] @@ -255,7 +252,6 @@ func (c *Core) Resolve(nodeID, nodeMask *crypto.NodeID) (fullNodeID *crypto.Node if sinfo != nil { fullNodeID = crypto.GetNodeID(&sinfo.theirPermPub) boxPubKey = &sinfo.theirPermPub - c.router.sessions.createSession(&sinfo.theirPermPub) } err = e close(done)