mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-04 06:53:12 +00:00
fix: only stop health monitor components if not nil (#3526)
This commit is contained in:
parent
b6855e85ab
commit
5640232085
@ -408,8 +408,11 @@ proc startHealthMonitor*(hm: NodeHealthMonitor): Result[void, string] =
|
||||
return ok()
|
||||
|
||||
proc stopHealthMonitor*(hm: NodeHealthMonitor) {.async.} =
|
||||
await hm.onlineMonitor.stopOnlineMonitor()
|
||||
await hm.keepAliveFut.cancelAndWait()
|
||||
if not hm.onlineMonitor.isNil():
|
||||
await hm.onlineMonitor.stopOnlineMonitor()
|
||||
|
||||
if not hm.keepAliveFut.isNil():
|
||||
await hm.keepAliveFut.cancelAndWait()
|
||||
|
||||
proc new*(
|
||||
T: type NodeHealthMonitor,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user