]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Include trackers in WriteStatus
authorMatt Joiner <anacrolix@gmail.com>
Fri, 21 Nov 2014 06:07:42 +0000 (00:07 -0600)
committerMatt Joiner <anacrolix@gmail.com>
Fri, 21 Nov 2014 06:07:42 +0000 (00:07 -0600)
torrent.go

index 087338263a7bcfc34e7919657eaf68bfc5b1eb2d..1fa05be14963eb45f1a5869b468d080c2b1c2fe4 100644 (file)
@@ -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))