mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
Add comment clarifying relay server sync loop
This commit is contained in:
parent
c8a6c3627d
commit
1b2a043993
|
|
@ -410,11 +410,13 @@ func (m *RelayServerRetriever) syncRelayServers(stop <-chan bool, running atomic
|
|||
|
||||
select {
|
||||
case <-stop:
|
||||
// We have been asked to stop syncing, drain the timer and return.
|
||||
if !t.Stop() {
|
||||
<-t.C
|
||||
}
|
||||
return
|
||||
case <-t.C:
|
||||
// The timer has expired. Continue to the next loop iteration.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue