forked from premiere/premiere-libtorrent
attempt to fix #190
This commit is contained in:
parent
8f07edbed2
commit
3c05e0fa41
|
@ -993,6 +993,17 @@ namespace detail
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// don't allow more connections than the max setting
|
||||||
|
if (m_connections.size() > max_connections())
|
||||||
|
{
|
||||||
|
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
|
||||||
|
(*m_logger) << "number of connections limit exceeded (conns: "
|
||||||
|
<< num_connections() << ", limit: " << max_connections()
|
||||||
|
<< "), connection rejected\n";
|
||||||
|
#endif
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// check if we have any active torrents
|
// check if we have any active torrents
|
||||||
// if we don't reject the connection
|
// if we don't reject the connection
|
||||||
if (m_torrents.empty()) return;
|
if (m_torrents.empty()) return;
|
||||||
|
|
Loading…
Reference in New Issue