diff --git a/tests/internal/FsmServiceHotReload.cpp b/tests/internal/FsmServiceHotReload.cpp index 8404c27..f27a0c4 100644 --- a/tests/internal/FsmServiceHotReload.cpp +++ b/tests/internal/FsmServiceHotReload.cpp @@ -50,8 +50,11 @@ namespace struct Work : State { Task run() { - auto& svc = service(); - const int total = svc.accumulate(1); + auto svc = acquire_service(); + if (!svc) { + co_return next(); + } + const int total = (*svc)->accumulate(1); if (total >= 500) { co_return succeed(total); }