mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-21 12:16:36 +00:00
chore: added tests (#1800)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user