From 184e50d156a0a92f90272e929022be425add41ee Mon Sep 17 00:00:00 2001 From: 4o1x5 <4o1x5@4o1x5.dev> Date: Thu, 24 Oct 2024 21:20:29 +0200 Subject: [PATCH] lib.rs: added handing for program --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 77e6155..766cd4c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -15,7 +15,7 @@ use std::{ str::from_utf8, sync::Arc, }; -use tokio::sync::Mutex; +use tokio::{signal, sync::Mutex}; pub mod client; mod test; @@ -190,6 +190,7 @@ impl BunBunWorker { }); } + signal::ctrl_c().await.expect("failed to listen for event"); // TODO hand the program } }