Browse Source

The assert is only valid if we haven't transitioned to end game.

master
Richard Nyberg 19 years ago
parent
commit
ee7abdea2a
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      btpd/policy_if.c

+ 5
- 2
btpd/policy_if.c View File

@@ -58,8 +58,11 @@ cm_on_download(struct peer *p)
struct torrent *tp = p->tp;
if (tp->endgame) {
cm_assign_requests_eg(p);
} else if (cm_assign_requests(p) == 0)
assert(!peer_wanted(p) || peer_laden(p));
} else {
unsigned count = cm_assign_requests(p);
if (count == 0 && !p->tp->endgame) // We may have entered end game.
assert(!peer_wanted(p) || peer_laden(p));
}
}

void


Loading…
Cancel
Save