saves banned peers in resume data

This commit is contained in:
Arvid Norberg
2007-10-03 17:37:15 +00:00
parent c9d245e9f1
commit 4cab49cbdf
4 changed files with 43 additions and 5 deletions

View File

@@ -673,8 +673,11 @@ namespace libtorrent
for (iterator i = m_peers.begin(); i != m_peers.end();)
{
// this timeout has to be customizable!
// don't remove banned peers, they should
// remain banned
if (i->second.connection == 0
&& i->second.connected != min_time()
&& !i->second.banned
&& now - i->second.connected > minutes(120))
{
if (p) p->clear_peer(&i->second);