* Stats: Remove tunnel.Bps.* stats when the tunnel pool is closed
This commit is contained in:
@ -112,6 +112,13 @@ public class StatManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hope this doesn't cause any problems with unsynchronized accesses like addRateData() ...
|
||||||
|
public void removeRateStat(String name) {
|
||||||
|
synchronized (_rateStats) {
|
||||||
|
_rateStats.remove(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** update the given frequency statistic, taking note that an event occurred (and recalculating all frequencies) */
|
/** update the given frequency statistic, taking note that an event occurred (and recalculating all frequencies) */
|
||||||
public void updateFrequency(String name) {
|
public void updateFrequency(String name) {
|
||||||
FrequencyStat freq = (FrequencyStat) _frequencyStats.get(name);
|
FrequencyStat freq = (FrequencyStat) _frequencyStats.get(name);
|
||||||
|
@ -89,6 +89,7 @@ public class TunnelPool {
|
|||||||
_alive = false;
|
_alive = false;
|
||||||
_lastSelectionPeriod = 0;
|
_lastSelectionPeriod = 0;
|
||||||
_lastSelected = null;
|
_lastSelected = null;
|
||||||
|
_context.statManager().removeRateStat(_rateName);
|
||||||
}
|
}
|
||||||
|
|
||||||
TunnelPoolManager getManager() { return _manager; }
|
TunnelPoolManager getManager() { return _manager; }
|
||||||
|
Reference in New Issue
Block a user