Add comment clarifying relay server sync loop

This commit is contained in:
Devon Hudson 2023-01-11 13:22:54 -07:00
parent c8a6c3627d
commit 1b2a043993
No known key found for this signature in database
GPG key ID: CD06B18E77F6A628

View file

@ -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.
}
}
}