2
0
mirror of synced 2025-02-24 06:38:14 +00:00

Fix logging of trust slice

This commit is contained in:
Matt Joiner 2016-11-30 18:01:39 +11:00
parent 97f6cb496e
commit 1f2f037209

View File

@ -1446,12 +1446,12 @@ func (t *Torrent) pieceHashed(piece int, correct bool) {
c.badPiecesDirtied++
}
slices.Sort(touchers, connLessTrusted)
log.Printf("dropping first corresponding conn from trust: %s", func() (ret []int) {
log.Printf("dropping first corresponding conn from trust: %v", func() (ret []int) {
for _, c := range touchers {
ret = append(ret, c.netGoodPiecesDirtied())
}
return
})
}())
c := touchers[0]
t.cl.banPeerIP(missinggo.AddrIP(c.remoteAddr()))
c.Drop()