Consistently stop tickers (#593)
This commit is contained in:
@@ -132,7 +132,10 @@ func (cs *ConnectionStats) updateStats() {
|
||||
if interval == 0 {
|
||||
interval = connectionQualityUpdateInterval
|
||||
}
|
||||
|
||||
tk := time.NewTicker(interval)
|
||||
defer tk.Stop()
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-cs.done:
|
||||
|
||||
Reference in New Issue
Block a user