Explorar el Código

Remove unsent requests from the write queue when we receive a choke.

master
Richard Nyberg hace 20 años
padre
commit
93053ce34a
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. +7
    -0
      btpd/peer.c

+ 7
- 0
btpd/peer.c Ver fichero

@@ -335,6 +335,13 @@ peer_on_choke(struct peer *p)
else {
p->flags |= PF_P_CHOKE;
cm_on_choke(p);
struct nb_link *nl = BTPDQ_FIRST(&p->outq);
while (nl != NULL) {
struct nb_link *next = BTPDQ_NEXT(nl, entry);
if (nl->nb->type == NB_REQUEST)
peer_unsend(p, nl);
nl = next;
}
}
}



Cargando…
Cancelar
Guardar