aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/command.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mumd/src/command.rs')
-rw-r--r--mumd/src/command.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/mumd/src/command.rs b/mumd/src/command.rs
index a1e8b21..f02ad19 100644
--- a/mumd/src/command.rs
+++ b/mumd/src/command.rs
@@ -22,9 +22,7 @@ pub async fn handle(
let ping_count = AtomicU64::new(0);
while let Some((command, mut response_sender)) = command_receiver.recv().await {
debug!("Received command {:?}", command);
- let mut state = state.write().unwrap();
- let event = state.handle_command(command, &mut packet_sender, &mut connection_info_sender);
- drop(state);
+ let event = crate::state::handle_command(Arc::clone(&state), command, &mut packet_sender, &mut connection_info_sender);
match event {
ExecutionContext::TcpEventCallback(event, generator) => {
tcp_event_queue.register_callback(