aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/command.rs
diff options
context:
space:
mode:
authorKapten Z∅∅m <55669224+default-username-852@users.noreply.github.com>2021-01-07 22:22:24 +0100
committerGitHub <noreply@github.com>2021-01-07 22:22:24 +0100
commit154a2930b3bbe5ede06648c3a10b8fa4904277f4 (patch)
tree18ee2f8b569991d1d0e6b6248539f70da63a62d7 /mumd/src/command.rs
parentba4aa72654f2d57d59f6e25151315213bec21192 (diff)
parent62d3e3d6bf3842a1aad28874a69992b0b880137e (diff)
downloadmum-154a2930b3bbe5ede06648c3a10b8fa4904277f4.tar.gz
Merge pull request #58 from mum-rs/tcp-voice-tunnel-2
TCP voice tunnel
Diffstat (limited to 'mumd/src/command.rs')
-rw-r--r--mumd/src/command.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/mumd/src/command.rs b/mumd/src/command.rs
index e77b34b..653d1fa 100644
--- a/mumd/src/command.rs
+++ b/mumd/src/command.rs
@@ -9,8 +9,8 @@ use ipc_channel::ipc::IpcSender;
use log::*;
use mumble_protocol::{Serverbound, control::ControlPacket};
use mumlib::command::{Command, CommandResponse};
-use std::sync::{Arc, Mutex};
-use tokio::sync::{mpsc, oneshot, watch};
+use std::sync::Arc;
+use tokio::sync::{mpsc, oneshot, watch, Mutex};
pub async fn handle(
state: Arc<Mutex<State>>,
@@ -26,7 +26,7 @@ pub async fn handle(
debug!("Begin listening for commands");
while let Some((command, response_sender)) = command_receiver.recv().await {
debug!("Received command {:?}", command);
- let mut state = state.lock().unwrap();
+ let mut state = state.lock().await;
let event = state.handle_command(command, &mut packet_sender, &mut connection_info_sender);
drop(state);
match event {