connection.go | 6 +++++- diff --git a/connection.go b/connection.go index 6e22efc9b37f43b5bb7297cf898b2492d6276b1a..a49f4fa27b0f43d16de638d2ddc377696b82869b 100644 --- a/connection.go +++ b/connection.go @@ -134,7 +134,11 @@ return cn.peerMinPieces } func (cn *connection) completedString() string { - return fmt.Sprintf("%d/%d", cn.peerPieces.Len(), cn.bestPeerNumPieces()) + have := cn.peerPieces.Len() + if cn.peerSentHaveAll { + have = cn.bestPeerNumPieces() + } + return fmt.Sprintf("%d/%d", have, cn.bestPeerNumPieces()) } // Correct the PeerPieces slice length. Return false if the existing slice is