use url.URL in place of string for most internal listen/peer address handling

This commit is contained in:
Arceliar 2021-05-23 20:34:13 -05:00
parent 58af92812e
commit 70c5b06286
4 changed files with 61 additions and 46 deletions

View file

@ -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)
}