Merge branch 'develop' of https://github.com/yggdrasil-network/yggdrasil-go into yggdrasil-v0.4.7-develop

This commit is contained in:
vadym 2022-12-01 14:36:36 +02:00
commit 35cc180647
20 changed files with 309 additions and 178 deletions

View file

@ -20,7 +20,7 @@ import (
// The Core object represents the Mesh node. You should create a Core
// object for each Mesh node you plan to run.
type Core struct {
address Address
address Address
// This is the main data structure that holds everything else for a node
// We're going to keep our own copy of the provided config - that way we can
// guarantee that it will be covered by the mutex
@ -123,6 +123,13 @@ func (c *Core) _addPeerLoop() {
})
}
func (c *Core) RetryPeersNow() {
if c.addPeerTimer != nil && !c.addPeerTimer.Stop() {
<-c.addPeerTimer.C
}
c.Act(nil, c._addPeerLoop)
}
// Stop shuts down the Mesh node.
func (c *Core) Stop() {
phony.Block(c, func() {