mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-04 06:53:12 +00:00
chore: wait before starting watchdog (#3502)
This commit is contained in:
parent
012d719722
commit
7123c5532c
@ -118,8 +118,12 @@ proc watchdogThreadBody(ctx: ptr WakuContext) {.thread.} =
|
|||||||
## Watchdog thread that monitors the Waku thread and notifies the library user if it hangs.
|
## Watchdog thread that monitors the Waku thread and notifies the library user if it hangs.
|
||||||
|
|
||||||
let watchdogRun = proc(ctx: ptr WakuContext) {.async.} =
|
let watchdogRun = proc(ctx: ptr WakuContext) {.async.} =
|
||||||
|
const WatchdogStartDelay = 10.seconds
|
||||||
const WatchdogTimeinterval = 1.seconds
|
const WatchdogTimeinterval = 1.seconds
|
||||||
const WakuNotRespondingTimeout = 3.seconds
|
const WakuNotRespondingTimeout = 3.seconds
|
||||||
|
|
||||||
|
# Give time for the node to be created and up before sending watchdog requests
|
||||||
|
await sleepAsync(WatchdogStartDelay)
|
||||||
while true:
|
while true:
|
||||||
await sleepAsync(WatchdogTimeinterval)
|
await sleepAsync(WatchdogTimeinterval)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user