aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/client.rs
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-04-06 20:48:15 +0200
committerGitHub <noreply@github.com>2021-04-06 20:48:15 +0200
commit9c116d48765ae9c567a9588e64995c404c9c26ab (patch)
treea65da0e2a48b5f1f02e963c87edf8515851255ac /mumd/src/client.rs
parent06a765afc73ec1f8f2af27f4ea2730ddaaf05852 (diff)
parente01383af1c417666d42a802e44a1d1e98bbcf14e (diff)
downloadmum-9c116d48765ae9c567a9588e64995c404c9c26ab.tar.gz
Merge pull request #82 from rbran/main
Diffstat (limited to 'mumd/src/client.rs')
-rw-r--r--mumd/src/client.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/mumd/src/client.rs b/mumd/src/client.rs
index c1a0152..9c2c2a0 100644
--- a/mumd/src/client.rs
+++ b/mumd/src/client.rs
@@ -6,8 +6,8 @@ use crate::state::State;
use futures_util::{select, FutureExt};
use mumble_protocol::{Serverbound, control::ControlPacket, crypt::ClientCryptState};
use mumlib::command::{Command, CommandResponse};
-use std::sync::Arc;
-use tokio::sync::{Mutex, mpsc, oneshot, watch};
+use std::sync::{Arc, RwLock};
+use tokio::sync::{mpsc, oneshot, watch};
pub async fn handle(
state: State,
@@ -27,7 +27,7 @@ pub async fn handle(
let (response_sender, response_receiver) =
mpsc::unbounded_channel();
- let state = Arc::new(Mutex::new(state));
+ let state = Arc::new(RwLock::new(state));
select! {
r = tcp::handle(