]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix deadlocks in WriteStatus due to incomplete renaming
authorMatt Joiner <anacrolix@gmail.com>
Sun, 3 Apr 2016 10:54:14 +0000 (20:54 +1000)
committerMatt Joiner <anacrolix@gmail.com>
Sun, 3 Apr 2016 10:54:14 +0000 (20:54 +1000)
client.go

index c03da7264411aeaaf06a533a7d64ee9c947b6918..134748d41b2e4972eec6c8a379142c85095366bb 100644 (file)
--- a/client.go
+++ b/client.go
@@ -240,10 +240,10 @@ func (cl *Client) WriteStatus(_w io.Writer) {
        fmt.Fprintf(w, "# Torrents: %d\n", len(cl.torrents))
        fmt.Fprintln(w)
        for _, t := range cl.sortedTorrents() {
-               if t.Name() == "" {
+               if t.name() == "" {
                        fmt.Fprint(w, "<unknown name>")
                } else {
-                       fmt.Fprint(w, t.Name())
+                       fmt.Fprint(w, t.name())
                }
                fmt.Fprint(w, "\n")
                if t.haveInfo() {