Break active peer status line up
This commit is contained in:
parent
1994e82297
commit
ae7261c392
|
@ -170,7 +170,8 @@ func eventAgeString(t time.Time) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cn *connection) WriteStatus(w io.Writer) {
|
func (cn *connection) WriteStatus(w io.Writer) {
|
||||||
fmt.Fprintf(w, "%-90s: %s completed, good chunks: %d/%d reqs: %d-%d, last msg: %s, connected: %s, last useful chunk: %s, flags: ", fmt.Sprintf("%q: %s-%s", cn.PeerID, cn.Socket.LocalAddr(), cn.Socket.RemoteAddr()), cn.completedString(), cn.UsefulChunksReceived, cn.UnwantedChunksReceived+cn.UsefulChunksReceived, len(cn.Requests), len(cn.PeerRequests), eventAgeString(cn.lastMessageReceived), eventAgeString(cn.completedHandshake), eventAgeString(cn.lastUsefulChunkReceived))
|
// \t isn't preserved in <pre> blocks?
|
||||||
|
fmt.Fprintf(w, "%s\n %s completed, good chunks: %d/%d reqs: %d-%d, last msg: %s, connected: %s, last useful chunk: %s, flags: ", fmt.Sprintf("%q: %s-%s", cn.PeerID, cn.Socket.LocalAddr(), cn.Socket.RemoteAddr()), cn.completedString(), cn.UsefulChunksReceived, cn.UnwantedChunksReceived+cn.UsefulChunksReceived, len(cn.Requests), len(cn.PeerRequests), eventAgeString(cn.lastMessageReceived), eventAgeString(cn.completedHandshake), eventAgeString(cn.lastUsefulChunkReceived))
|
||||||
c := func(b byte) {
|
c := func(b byte) {
|
||||||
fmt.Fprintf(w, "%c", b)
|
fmt.Fprintf(w, "%c", b)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue