From 06c3f87461263d7c5f512578cd2d309d2d5696cf Mon Sep 17 00:00:00 2001 From: gabrielmer <101006718+gabrielmer@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:07:12 +0300 Subject: [PATCH] chore: wait before starting watchdog (#3502) --- library/waku_context.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/waku_context.nim b/library/waku_context.nim index 2dd9e9c95..6a565c117 100644 --- a/library/waku_context.nim +++ b/library/waku_context.nim @@ -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)