mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-06-19 15:45:06 +03:00
Fix add peer loop, add peers at startup
This commit is contained in:
parent
8057d80ec9
commit
9ea1d35a14
5 changed files with 47 additions and 82 deletions
|
@ -180,6 +180,15 @@ func main() {
|
|||
} else {
|
||||
logger.Errorln("Unable to get Listener:", err)
|
||||
}
|
||||
// Add our peers
|
||||
for _, addr := range n.config.Peers {
|
||||
n.core.AddPeer(addr, "")
|
||||
}
|
||||
for sintf, addrs := range n.config.InterfacePeers {
|
||||
for _, addr := range addrs {
|
||||
n.core.AddPeer(addr, sintf)
|
||||
}
|
||||
}
|
||||
// Make some nice output that tells us what our IPv6 address and subnet are.
|
||||
// This is just logged to stdout for the user.
|
||||
address := n.core.Address()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue