mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 13:27:17 +01:00
Merge pull request #2024 from Vort/congestion_zero_check
add zero check to congestion level calculations
This commit is contained in:
commit
ee8449fa05
|
@ -240,7 +240,7 @@ namespace tunnel
|
|||
|
||||
void SetMaxNumTransitTunnels (uint32_t maxNumTransitTunnels);
|
||||
uint32_t GetMaxNumTransitTunnels () const { return m_MaxNumTransitTunnels; };
|
||||
int GetCongestionLevel() const { return CONGESTION_LEVEL_FULL * m_TransitTunnels.size() / m_MaxNumTransitTunnels; }
|
||||
int GetCongestionLevel() const { return m_MaxNumTransitTunnels ? CONGESTION_LEVEL_FULL * m_TransitTunnels.size() / m_MaxNumTransitTunnels : CONGESTION_LEVEL_FULL; }
|
||||
|
||||
private:
|
||||
|
||||
|
|
Loading…
Reference in a new issue