Fix logging of trust slice
This commit is contained in:
parent
97f6cb496e
commit
1f2f037209
@ -1446,12 +1446,12 @@ func (t *Torrent) pieceHashed(piece int, correct bool) {
|
|||||||
c.badPiecesDirtied++
|
c.badPiecesDirtied++
|
||||||
}
|
}
|
||||||
slices.Sort(touchers, connLessTrusted)
|
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 {
|
for _, c := range touchers {
|
||||||
ret = append(ret, c.netGoodPiecesDirtied())
|
ret = append(ret, c.netGoodPiecesDirtied())
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
})
|
}())
|
||||||
c := touchers[0]
|
c := touchers[0]
|
||||||
t.cl.banPeerIP(missinggo.AddrIP(c.remoteAddr()))
|
t.cl.banPeerIP(missinggo.AddrIP(c.remoteAddr()))
|
||||||
c.Drop()
|
c.Drop()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user