mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
Merge branch 'develop' of https://github.com/yggdrasil-network/yggdrasil-go into yggdrasil-v0.4.7-develop
This commit is contained in:
commit
35cc180647
20 changed files with 309 additions and 178 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue