diff --git a/library/waku_context.nim b/library/waku_context.nim index fc6b1258b..6a6422d02 100644 --- a/library/waku_context.nim +++ b/library/waku_context.nim @@ -192,6 +192,11 @@ proc wakuThreadBody(ctx: ptr WakuContext) {.thread.} = error "waku thread could not receive a request" continue + ## Handle the request + echo "--------------- before asyncSpawn" + asyncSpawn WakuThreadRequest.process(request, addr waku) + echo "------------- after asyncSpawn" + echo "----------- wakuThreadBody 7 sending sync" let fireRes = ctx.reqReceivedSignal.fireSync() echo "----------- wakuThreadBody after sending sync" @@ -199,11 +204,6 @@ proc wakuThreadBody(ctx: ptr WakuContext) {.thread.} = echo "----------- failed sending sync" error "could not fireSync back to requester thread", error = fireRes.error - ## Handle the request - echo "--------------- before asyncSpawn" - asyncSpawn WakuThreadRequest.process(request, addr waku) - echo "------------- after asyncSpawn" - waitFor wakuRun(ctx) proc createWakuContext*(): Result[ptr WakuContext, string] =