Consistently stop tickers (#593)

This commit is contained in:
Raja Subramanian
2022-04-05 20:42:06 +05:30
committed by GitHub
parent b695376086
commit 92009b6428
6 changed files with 10 additions and 0 deletions
+1
View File
@@ -291,6 +291,7 @@ func (s *LivekitServer) healthCheck(w http.ResponseWriter, _ *http.Request) {
// worker to perform periodic tasks per node
func (s *LivekitServer) backgroundWorker() {
roomTicker := time.NewTicker(30 * time.Second)
defer roomTicker.Stop()
for {
select {
case <-s.doneChan: