chore: wait before starting watchdog (#3502)

This commit is contained in:
gabrielmer 2025-07-11 12:07:12 +03:00 committed by GitHub
parent 77602eca23
commit 06c3f87461
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.
let watchdogRun = proc(ctx: ptr WakuContext) {.async.} =
const WatchdogStartDelay = 10.seconds
const WatchdogTimeinterval = 1.seconds
const WakuNotRespondingTimeout = 3.seconds
# Give time for the node to be created and up before sending watchdog requests
await sleepAsync(WatchdogStartDelay)
while true:
await sleepAsync(WatchdogTimeinterval)