applied patch from #145
This commit is contained in:
@@ -786,6 +786,28 @@ namespace detail
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check if we have any active torrents
|
||||||
|
// if we don't reject the connection
|
||||||
|
if (m_torrents.empty())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool has_active_torrent = false;
|
||||||
|
for (torrent_map::iterator i = m_torrents.begin()
|
||||||
|
, end(m_torrents.end()); i != end; ++i)
|
||||||
|
{
|
||||||
|
if (!i->second->is_paused())
|
||||||
|
{
|
||||||
|
has_active_torrent = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!has_active_torrent)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
boost::intrusive_ptr<peer_connection> c(
|
boost::intrusive_ptr<peer_connection> c(
|
||||||
new bt_peer_connection(*this, s, 0));
|
new bt_peer_connection(*this, s, 0));
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
Reference in New Issue
Block a user