mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
* Transports: update IsBandwidthExceeded() and comments in header
This commit is contained in:
parent
642bcfcdea
commit
aef6b7712c
2 changed files with 5 additions and 7 deletions
|
@ -200,9 +200,9 @@ namespace transport
|
|||
|
||||
bool Transports::IsBandwidthExceeded () const
|
||||
{
|
||||
if (i2p::context.GetRouterInfo ().IsExtraBandwidth ()) return false;
|
||||
auto limit = i2p::context.GetBandwidthLimit() * 1024; // convert to bytes
|
||||
auto bw = std::max (m_InBandwidth, m_OutBandwidth);
|
||||
return bw > (i2p::context.GetRouterInfo ().IsHighBandwidth () ? HIGH_BANDWIDTH_LIMIT : LOW_BANDWIDTH_LIMIT);
|
||||
return bw > limit;
|
||||
}
|
||||
|
||||
void Transports::SendMessage (const i2p::data::IdentHash& ident, std::shared_ptr<i2p::I2NPMessage> msg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue