fix bug in hostname resolver

This commit is contained in:
Arvid Norberg 2014-09-01 07:26:29 +00:00
parent b1208c9f63
commit 57b00ae42e
1 changed files with 2 additions and 4 deletions

View File

@ -79,10 +79,8 @@ namespace libtorrent
for (cache_t::iterator i = m_cache.begin();
i != m_cache.end(); ++i)
{
cache_t::iterator e = i;
++i;
if (e->second.last_seen < oldest->second.last_seen)
oldest = e;
if (i->second.last_seen < oldest->second.last_seen)
oldest = i;
}
// remove the oldest entry