improve last commit: only announce to local dht tracker if we ever connected to peer.

This commit is contained in:
Miguel Freitas 2013-10-28 18:58:29 -02:00
parent ac76c967ae
commit 40803b910c

View File

@ -2069,7 +2069,7 @@ namespace libtorrent
for (; i != end; ++i) {
policy::peer const* p = *i;
if( p->connectable && !p->banned &&
if( p->connectable && !p->banned && p->last_connected &&
int(p->failcount) < settings().max_failcount ) {
m_ses.m_dht->announce(name(), m_torrent_file->info_hash()
, p->address(), p->port, p->seed, false