Ver código fonte

Don't try to assign requests if the peer already has enough requests.

master
Richard Nyberg 19 anos atrás
pai
commit
5d6ad9d7bb
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      btpd/policy_if.c

+ 2
- 2
btpd/policy_if.c Ver arquivo

@@ -39,14 +39,14 @@ cm_on_piece_ann(struct peer *p, uint32_t index)
}
} else if (pc == NULL) {
peer_want(p, index);
if (!peer_chokes(p)) {
if (!peer_chokes(p) && !peer_laden(p)) {
pc = cm_new_piece(tp, index);
if (pc != NULL)
cm_piece_assign_requests(pc, p);
}
} else if (!piece_full(pc)) {
peer_want(p, index);
if (!peer_chokes(p))
if (!peer_chokes(p) && !peer_laden(p))
cm_piece_assign_requests(pc, p);
}
}


Carregando…
Cancelar
Salvar