Kaynağa Gözat

Better tests. peer_laden is needed beacuse the peer might have

gotten new request if the piece was fully downloaded and found
to be bad.
master
Richard Nyberg 20 yıl önce
ebeveyn
işleme
1e1846b8f3
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. +2
    -2
      btpd/policy_if.c

+ 2
- 2
btpd/policy_if.c Dosyayı Görüntüle

@@ -261,7 +261,7 @@ cm_on_block(struct peer *p, uint32_t index, uint32_t begin, uint32_t length,

if (tp->endgame) {
BTPDQ_FOREACH(p, &tp->peers, cm_entry) {
if (peer_has(p, index) && peer_leech_ok(p))
if (peer_has(p, index) && p->nreqs_out > 0)
peer_cancel(p, index, begin, length);
}
if (pc->ngot == pc->nblocks)
@@ -272,7 +272,7 @@ cm_on_block(struct peer *p, uint32_t index, uint32_t begin, uint32_t length,
pc->nbusy--;
if (pc->ngot == pc->nblocks)
cm_on_piece(pc);
if (peer_leech_ok(p))
if (peer_leech_ok(p) && !peer_laden(p))
cm_assign_requests(p);
}
}

||||||
x
 
000:0
Yükleniyor…
İptal
Kaydet