mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-26 01:55:15 +00:00
disable lsd for private torrents
This commit is contained in:
parent
946a86c815
commit
b220064462
@ -1600,6 +1600,8 @@ namespace detail
|
|||||||
|
|
||||||
boost::shared_ptr<torrent> t = find_torrent(ih).lock();
|
boost::shared_ptr<torrent> t = find_torrent(ih).lock();
|
||||||
if (!t) return;
|
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)
|
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
|
||||||
(*m_logger) << time_now_string()
|
(*m_logger) << time_now_string()
|
||||||
|
@ -395,6 +395,8 @@ namespace libtorrent
|
|||||||
{
|
{
|
||||||
boost::weak_ptr<torrent> self(shared_from_this());
|
boost::weak_ptr<torrent> self(shared_from_this());
|
||||||
|
|
||||||
|
if (!m_torrent_file.priv())
|
||||||
|
{
|
||||||
// announce on local network every 5 minutes
|
// announce on local network every 5 minutes
|
||||||
m_announce_timer.expires_from_now(minutes(5));
|
m_announce_timer.expires_from_now(minutes(5));
|
||||||
m_announce_timer.async_wait(m_ses.m_strand.wrap(
|
m_announce_timer.async_wait(m_ses.m_strand.wrap(
|
||||||
@ -402,6 +404,13 @@ namespace libtorrent
|
|||||||
|
|
||||||
// announce with the local discovery service
|
// announce with the local discovery service
|
||||||
m_ses.announce_lsd(m_torrent_file.info_hash());
|
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
|
#ifndef TORRENT_DISABLE_DHT
|
||||||
if (!m_ses.m_dht) return;
|
if (!m_ses.m_dht) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user