Print peer IDs as escaped ascii
This commit is contained in:
parent
99a06e3f50
commit
859129fb28
|
@ -208,7 +208,7 @@ func (cl *Client) WriteStatus(_w io.Writer) {
|
|||
} else {
|
||||
fmt.Fprintln(w, "Not listening!")
|
||||
}
|
||||
fmt.Fprintf(w, "Peer ID: %q\n", cl.peerID)
|
||||
fmt.Fprintf(w, "Peer ID: %+q\n", cl.peerID)
|
||||
if cl.dHT != nil {
|
||||
dhtStats := cl.dHT.Stats()
|
||||
fmt.Fprintf(w, "DHT nodes: %d (%d good)\n", dhtStats.Nodes, dhtStats.GoodNodes)
|
||||
|
|
|
@ -236,7 +236,7 @@ func (cn *connection) statusFlags() (ret string) {
|
|||
|
||||
func (cn *connection) WriteStatus(w io.Writer, t *torrent) {
|
||||
// \t isn't preserved in <pre> blocks?
|
||||
fmt.Fprintf(w, "%q: %s-%s\n", cn.PeerID, cn.localAddr(), cn.remoteAddr())
|
||||
fmt.Fprintf(w, "%+q: %s-%s\n", cn.PeerID, cn.localAddr(), cn.remoteAddr())
|
||||
fmt.Fprintf(w, " last msg: %s, connected: %s, last useful chunk: %s\n",
|
||||
eventAgeString(cn.lastMessageReceived),
|
||||
eventAgeString(cn.completedHandshake),
|
||||
|
|
Loading…
Reference in New Issue