From 6065a55818c30dfbe7c3cfd4505b7532d2ae4a6a Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 2 Aug 2016 11:18:33 +1000 Subject: [PATCH] Fix some more races in the status writing --- torrent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torrent.go b/torrent.go index dd3a83cf..ff8f772f 100644 --- a/torrent.go +++ b/torrent.go @@ -424,10 +424,10 @@ func (t *Torrent) writeStatus(w io.Writer) { return "?" } }()) - if t.haveInfo() { + if t.Info() != nil { fmt.Fprintf(w, "Num Pieces: %d\n", t.numPieces()) fmt.Fprint(w, "Piece States:") - for _, psr := range t.pieceStateRuns() { + for _, psr := range t.PieceStateRuns() { w.Write([]byte(" ")) w.Write([]byte(pieceStateRunStatusChars(psr))) } -- 2.48.1