Stop tickers to free up resources (#263)

This commit is contained in:
Callan Taylor
2019-12-02 04:29:36 +13:00
committed by ffdfgdfg
parent bdf12fe22a
commit 88dcea59ec
5 changed files with 8 additions and 1 deletions

View File

@@ -117,6 +117,7 @@ func StartLocalServer(l *config.LocalServer, config *config.CommonConfig) error
func handleUdpMonitor(config *config.CommonConfig, l *config.LocalServer) {
ticker := time.NewTicker(time.Second * 1)
defer ticker.Stop()
for {
select {
case <-ticker.C: