Redial failed connections if possible (#983)

This commit is contained in:
Neil Alexander 2022-11-12 11:30:03 +00:00 committed by GitHub
parent 0da871f528
commit 7efd66932f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 124 additions and 28 deletions

View file

@ -121,6 +121,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 Yggdrasil node.
func (c *Core) Stop() {
phony.Block(c, func() {