fix(test): hold owning ServiceHandle across hot-reload calls in FsmServiceHotReload
This commit is contained in:
1 parent
1a54f3857e
commit
cb988fa985
1 file changed
+5
-2
@@ -50,8 +50,11 @@ namespace
|
|||||||
struct Work : State {
|
struct Work : State {
|
||||||
Task<StateKey> run()
|
Task<StateKey> run()
|
||||||
{
|
{
|
||||||
auto& svc = service<VoidTest::ICalc>();
|
auto svc = acquire_service<VoidTest::ICalc>();
|
||||||
const int total = svc.accumulate(1);
|
if (!svc) {
|
||||||
|
co_return next<Work>();
|
||||||
|
}
|
||||||
|
const int total = (*svc)->accumulate(1);
|
||||||
if (total >= 500) {
|
if (total >= 500) {
|
||||||
co_return succeed(total);
|
co_return succeed(total);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user