Browse Source

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

miguelfreitas
Miguel Freitas 11 years ago
parent
commit
40803b910c
  1. 2
      libtorrent/src/torrent.cpp

2
libtorrent/src/torrent.cpp

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

Loading…
Cancel
Save