Show the IP address on the end of each connection
This commit is contained in:
1 parent
bd45c7212f
commit
464a1c8246
1 file changed
+2
-2
+2
-2
@@ -105,8 +105,8 @@ func (cache *PeerCache) String() string {
|
|||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
cache.ForEach(func(name PeerName, peer *Peer) {
|
cache.ForEach(func(name PeerName, peer *Peer) {
|
||||||
buf.WriteString(fmt.Sprint(peer, "\n"))
|
buf.WriteString(fmt.Sprint(peer, "\n"))
|
||||||
peer.ForEachConnection(func(remoteName PeerName, _ Connection) {
|
peer.ForEachConnection(func(remoteName PeerName, conn Connection) {
|
||||||
buf.WriteString(fmt.Sprintf(" -> %v\n", remoteName))
|
buf.WriteString(fmt.Sprintf(" -> %v [%v]\n", remoteName, conn.RemoteTCPAddr()))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return buf.String()
|
return buf.String()
|
||||||
|
|||||||
Reference in new issue
Block a user