Merge pull request #58 from bboreham/50_show_ip

Show the IP address on the end of each connection

Closes #50
This commit is contained in:
rade committed 2014-09-15 18:04:01 +01:00
commit 2e66694355
1 file changed
+2 -2
+2 -2
View File
@@ -105,8 +105,8 @@ func (cache *PeerCache) String() string {
var buf bytes.Buffer
cache.ForEach(func(name PeerName, peer *Peer) {
buf.WriteString(fmt.Sprint(peer, "\n"))
peer.ForEachConnection(func(remoteName PeerName, _ Connection) {
buf.WriteString(fmt.Sprintf(" -> %v\n", remoteName))
peer.ForEachConnection(func(remoteName PeerName, conn Connection) {
buf.WriteString(fmt.Sprintf(" -> %v [%v]\n", remoteName, conn.RemoteTCPAddr()))
})
})
return buf.String()