瀏覽代碼

ethstats: add missing Ticker.Stop call (#20867)

ucwong 5 年之前
父節點
當前提交
37d6357806
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      ethstats/ethstats.go

+ 1 - 0
ethstats/ethstats.go

@@ -240,6 +240,7 @@ func (s *Service) loop() {
 		}
 		// Keep sending status updates until the connection breaks
 		fullReport := time.NewTicker(15 * time.Second)
+		defer fullReport.Stop()
 
 		for err == nil {
 			select {