Client is approx 5% done
This commit is contained in:
+1
-2
@@ -43,8 +43,6 @@ pub async fn api_process
|
||||
let tx_filter1 = warp::any().map(move || tx.clone());
|
||||
let tx_filter2 = tx_filter1.clone();
|
||||
|
||||
info!("Running server");
|
||||
|
||||
// The server route is loaded at address:port/happening
|
||||
let main = warp::path("happening")
|
||||
.and(warp::get())
|
||||
@@ -109,6 +107,7 @@ pub async fn api_process
|
||||
|
||||
let routes = main.or(characters).or(choice).or(input);
|
||||
// Start the server
|
||||
info!("Running server");
|
||||
warp::serve(routes)
|
||||
.run(([127, 0, 0, 1],config::API_PORT))
|
||||
.await;
|
||||
|
||||
+1
-2
@@ -121,8 +121,7 @@ async fn main()
|
||||
Ok(()) =>
|
||||
{
|
||||
api::modify_data(&happening_stack, "end".to_string(), String::new(), String::new(), vec![]);
|
||||
// TODO fix quitting instantly
|
||||
let _ = rx.recv(); // Wait for the client to respond
|
||||
let _ = rx.recv();
|
||||
info!("Program exited successfully");
|
||||
exit(0);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user