bandwidth limiter asserts

This commit is contained in:
Marcos Pinto 2007-08-26 23:49:57 +00:00
parent b38fd29eae
commit e01ac4c846
1 changed files with 2 additions and 0 deletions

View File

@ -2025,7 +2025,9 @@ namespace libtorrent
, boost::intrusive_ptr<peer_connection> const& p , boost::intrusive_ptr<peer_connection> const& p
, bool non_prioritized) , bool non_prioritized)
{ {
assert(m_bandwidth_limit[channel].throttle() > 0);
int block_size = m_bandwidth_limit[channel].throttle() / 10; int block_size = m_bandwidth_limit[channel].throttle() / 10;
if (block_size <= 0) block_size = 1;
if (m_bandwidth_limit[channel].max_assignable() > 0) if (m_bandwidth_limit[channel].max_assignable() > 0)
{ {