diff --git a/libtorrent/src/session_impl.cpp b/libtorrent/src/session_impl.cpp index 085f5960b..f4323586c 100755 --- a/libtorrent/src/session_impl.cpp +++ b/libtorrent/src/session_impl.cpp @@ -1600,6 +1600,8 @@ namespace detail boost::shared_ptr t = find_torrent(ih).lock(); if (!t) return; + // don't add peers from lsd to private torrents + if (t->torrent_file().priv()) return; #if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING) (*m_logger) << time_now_string() diff --git a/libtorrent/src/torrent.cpp b/libtorrent/src/torrent.cpp index ed1dc1d9b..6a9a80c58 100755 --- a/libtorrent/src/torrent.cpp +++ b/libtorrent/src/torrent.cpp @@ -395,13 +395,22 @@ namespace libtorrent { boost::weak_ptr self(shared_from_this()); - // announce on local network every 5 minutes - m_announce_timer.expires_from_now(minutes(5)); - m_announce_timer.async_wait(m_ses.m_strand.wrap( - bind(&torrent::on_announce_disp, self, _1))); + if (!m_torrent_file.priv()) + { + // announce on local network every 5 minutes + m_announce_timer.expires_from_now(minutes(5)); + m_announce_timer.async_wait(m_ses.m_strand.wrap( + bind(&torrent::on_announce_disp, self, _1))); - // announce with the local discovery service - m_ses.announce_lsd(m_torrent_file.info_hash()); + // announce with the local discovery service + m_ses.announce_lsd(m_torrent_file.info_hash()); + } + else + { + m_announce_timer.expires_from_now(minutes(15)); + m_announce_timer.async_wait(m_ses.m_strand.wrap( + bind(&torrent::on_announce_disp, self, _1))); + } #ifndef TORRENT_DISABLE_DHT if (!m_ses.m_dht) return;