[#1614] node: Update health metric on its change

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
remotes/fyrchik/tree-errors
Pavel Karpy 2022-07-19 18:17:12 +03:00 committed by fyrchik
parent 581a9901c9
commit a4ed91f9b5
1 changed files with 4 additions and 0 deletions

View File

@ -70,6 +70,10 @@ func (c *cfg) NetmapStatus() control.NetmapStatus {
func (c *cfg) setHealthStatus(st control.HealthStatus) {
c.healthStatus.Store(int32(st))
if c.metricsCollector != nil {
c.metricsCollector.SetHealth(int32(st))
}
}
func (c *cfg) HealthStatus() control.HealthStatus {