Don't use read_enabled in get_rb_size.
We're no longer maintaining read_enabled, as there are simpler ways of doing the same. Additionally, we used RBDrained incorrectly.
This commit is contained in:
parent
77c034122e
commit
c9c2ad7c57
|
@ -407,11 +407,7 @@ utp_get_rb_size(void *closure)
|
|||
size_t bytes;
|
||||
assert( tr_isPeerIo( io ) );
|
||||
|
||||
if( io->read_enabled )
|
||||
bytes =
|
||||
tr_bandwidthClamp( &io->bandwidth, TR_DOWN, UTP_READ_BUFFER_SIZE );
|
||||
else
|
||||
bytes = 0;
|
||||
bytes = tr_bandwidthClamp( &io->bandwidth, TR_DOWN, UTP_READ_BUFFER_SIZE );
|
||||
|
||||
return UTP_READ_BUFFER_SIZE - bytes;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue