Skip to content

Commit

Permalink
spawn spawn_ctrl_c_handler outside the abortable pool
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Sep 16, 2024
1 parent ae8d70e commit f86dd5c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm2src/mm2_main/src/mm2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#[cfg(not(target_arch = "wasm32"))] use common::block_on;
use common::crash_reports::init_crash_reports;
use common::double_panic_crash;
use common::executor::SpawnFuture;
use common::log;
use common::log::LogLevel;
use common::password_policy::password_policy;
Expand Down Expand Up @@ -174,7 +173,7 @@ pub async fn lp_main(
/// It's important to spawn this task as soon as `Ctx` is in the correct state.
#[cfg(not(target_arch = "wasm32"))]
fn spawn_ctrl_c_handler(ctx: mm2_core::mm_ctx::MmArc) {
ctx.spawner().spawn(async move {
common::executor::spawn(async move {
tokio::signal::ctrl_c()
.await
.expect("Couldn't listen for the CTRL-C signal.");
Expand Down

0 comments on commit f86dd5c

Please sign in to comment.