mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
Don't call createSession twice
This commit is contained in:
parent
4dfddd804f
commit
0f19807e16
1 changed files with 0 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue