5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-23 04:21:34 +00:00

Don't send IP back twice with getPeers

This commit is contained in:
Neil Alexander 2019-07-22 19:45:48 +01:00
parent 48ad3c5d7f
commit 8669091a08
No known key found for this signature in database
GPG Key ID: A02A2019A2BB0944

View File

@ -103,7 +103,6 @@ func (a *AdminSocket) Init(c *yggdrasil.Core, state *config.NodeState, log *log.
addr := *address.AddrForNodeID(crypto.GetNodeID(&p.PublicKey)) addr := *address.AddrForNodeID(crypto.GetNodeID(&p.PublicKey))
so := net.IP(addr[:]).String() so := net.IP(addr[:]).String()
peers[so] = Info{ peers[so] = Info{
"ip": so,
"port": p.Port, "port": p.Port,
"uptime": p.Uptime.Seconds(), "uptime": p.Uptime.Seconds(),
"bytes_sent": p.BytesSent, "bytes_sent": p.BytesSent,