applied patch from #145
This commit is contained in:
parent
c6b8b22679
commit
4e8d49d028
|
@ -786,8 +786,30 @@ namespace detail
|
|||
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(
|
||||
new bt_peer_connection(*this, s, 0));
|
||||
new bt_peer_connection(*this, s, 0));
|
||||
#ifndef NDEBUG
|
||||
c->m_in_constructor = false;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue