diff options
Diffstat (limited to 'mumd/src/main.rs')
| -rw-r--r-- | mumd/src/main.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/mumd/src/main.rs b/mumd/src/main.rs index 276e2ce..42be3f8 100644 --- a/mumd/src/main.rs +++ b/mumd/src/main.rs @@ -1,10 +1,13 @@ mod audio; mod client; mod command; +mod error; mod network; mod notify; mod state; +use crate::state::State; + use futures_util::{SinkExt, StreamExt}; use log::*; use mumlib::command::{Command, CommandResponse}; @@ -53,8 +56,16 @@ async fn main() { let (command_sender, command_receiver) = mpsc::unbounded_channel(); + let state = match State::new() { + Ok(s) => s, + Err(e) => { + error!("Error instantiating mumd: {}", e); + return; + } + }; + join!( - client::handle(command_receiver), + client::handle(state, command_receiver), receive_commands(command_sender), ); } |
