浏览代码

dl_on_lost_peer must remove the peer from the list. This was accidentally

removed in a previous commit. Fix indentation.
master
Richard Nyberg 19 年前
父节点
当前提交
cbc1a81d06
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      btpd/download.c

+ 2
- 1
btpd/download.c 查看文件

@@ -180,10 +180,11 @@ dl_on_lost_peer(struct peer *p)
assert(tp->npeers > 0 && (p->flags & PF_ATTACHED) != 0);
tp->npeers--;
p->flags &= ~PF_ATTACHED;
BTPDQ_REMOVE(&tp->peers, p, p_entry);

for (uint32_t i = 0; i < tp->meta.npieces; i++)
if (peer_has(p, i))
tp->piece_count[i]--;
tp->piece_count[i]--;

if (p->nreqs_out > 0)
dl_on_undownload(p);


||||||
x
 
000:0
正在加载...
取消
保存