chore: added tests (#1800)

Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
Jan-Otto Kröpke
2024-12-01 21:50:49 +01:00
committed by GitHub
parent 0ad8e01e0e
commit 109c34f572
34 changed files with 196 additions and 11 deletions

View File

@@ -312,9 +312,17 @@ func (c *Collector) Close() {
c.handle = 0
close(c.collectCh)
close(c.counterValuesCh)
close(c.errorCh)
if c.collectCh != nil {
close(c.collectCh)
}
if c.counterValuesCh != nil {
close(c.counterValuesCh)
}
if c.errorCh != nil {
close(c.errorCh)
}
c.counterValuesCh = nil
c.collectCh = nil