From 9c37205dde9a95decf6262bbe8fbf098bf1287b8 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Fri, 21 Nov 2014 00:07:42 -0600 Subject: [PATCH] Include trackers in WriteStatus --- torrent.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/torrent.go b/torrent.go index 08733826..1fa05be1 100644 --- a/torrent.go +++ b/torrent.go @@ -319,6 +319,13 @@ func (t *torrent) WriteStatus(w io.Writer) { fmt.Fprintf(w, "%c", t.pieceStatusChar(index)) } fmt.Fprintln(w) + fmt.Fprintf(w, "Trackers: ") + for _, tier := range t.Trackers { + for _, tr := range tier { + fmt.Fprintf(w, "%q ", tr.String()) + } + } + fmt.Fprintf(w, "\n") fmt.Fprintf(w, "Pending peers: %d\n", len(t.Peers)) fmt.Fprintf(w, "Half open: %d\n", len(t.HalfOpen)) fmt.Fprintf(w, "Active peers: %d\n", len(t.Conns))