mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
use url.URL in place of string for most internal listen/peer address handling
This commit is contained in:
parent
58af92812e
commit
70c5b06286
4 changed files with 61 additions and 46 deletions
|
@ -68,7 +68,7 @@ func (c *Core) _addPeerLoop() {
|
|||
|
||||
// Add peers from the Peers section
|
||||
for _, peer := range current.Peers {
|
||||
go func(peer, intf string) {
|
||||
go func(peer string, intf string) {
|
||||
if err := c.CallPeer(peer, intf); err != nil {
|
||||
c.log.Errorln("Failed to add peer:", err)
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ func (c *Core) _addPeerLoop() {
|
|||
// Add peers from the InterfacePeers section
|
||||
for intf, intfpeers := range current.InterfacePeers {
|
||||
for _, peer := range intfpeers {
|
||||
go func(peer, intf string) {
|
||||
go func(peer string, intf string) {
|
||||
if err := c.CallPeer(peer, intf); err != nil {
|
||||
c.log.Errorln("Failed to add peer:", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue