Skip to content

Commit a6cee2f

Browse files
committed
fix(cli): keep dev coroutine task alive during execution
1 parent c1a9fd7 commit a6cee2f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/commands/run/dev/DevSession.cpp‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ namespace vix::commands::RunCommand::dev
536536
DevSessionResult result;
537537
bool completed = false;
538538

539-
auto mainTask =
539+
auto runMainTask =
540540
[this, &ctx, &cancel, &result, &completed]() -> vix::async::core::task<void>
541541
{
542542
try
@@ -562,7 +562,9 @@ namespace vix::commands::RunCommand::dev
562562
ctx.stop();
563563

564564
co_return;
565-
}();
565+
};
566+
567+
auto mainTask = runMainTask();
566568

567569
std::move(mainTask).start(ctx.get_scheduler());
568570

0 commit comments

Comments
 (0)