Skip to content

Commit

Permalink
Fix cli bin - prevent main fn exit
Browse files Browse the repository at this point in the history
  • Loading branch information
akiroz committed Jan 18, 2024
1 parent 0e793c6 commit 193d0de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bin/client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use core::time::Duration;
use env_logger;
use zika::client::Client;
use zika::config::read_from_default_location;
Expand All @@ -11,4 +12,5 @@ async fn main() {
let config = read_from_default_location().expect("A proper config file");
log::debug!("Config = {:?}", config);
let _ = Client::from_config(config).await;
loop { tokio::time::sleep(Duration::from_secs(1)).await; }
}
2 changes: 2 additions & 0 deletions src/bin/server.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use core::time::Duration;
use env_logger;
use zika::config::read_from_default_location;
use zika::server::Server;
Expand All @@ -11,4 +12,5 @@ async fn main() {
let config = read_from_default_location().expect("A proper config file");
log::debug!("Config = {:?}", config);
let _ = Server::from_config(config);
loop { tokio::time::sleep(Duration::from_secs(1)).await; }
}

0 comments on commit 193d0de

Please sign in to comment.