cleaned up comments, added some asserts, added setup_send() as proposed by Tianhao Qiu to speed up connection attempts

This commit is contained in:
Arvid Norberg
2006-05-01 23:34:37 +00:00
parent ddefc0d348
commit 73b1c5c9b8
4 changed files with 18 additions and 35 deletions

View File

@@ -807,6 +807,11 @@ namespace libtorrent { namespace detail
// distribute the maximum upload rate among the torrents
assert(m_upload_rate >= -1);
assert(m_download_rate >= -1);
assert(m_max_uploads >= -1);
assert(m_max_connections >= -1);
allocate_resources(m_upload_rate == -1
? std::numeric_limits<int>::max()
: int(m_upload_rate * tick_interval)