This commit is contained in:
illegitimate-egg 2025-12-24 00:11:18 +00:00
parent 72fe7e13f1
commit 1cd4faafee

View File

@ -2,8 +2,7 @@ use log::{info, warn};
use std::io::prelude::*;
use std::net::TcpStream;
use std::sync::{Arc, Mutex};
use std::thread::{self, sleep};
use std::time::Duration;
use std::thread;
use crate::command::handle_command;
use crate::config::ServerConfig;
@ -47,12 +46,10 @@ pub fn handle_client(
player_statuses[client_number as usize] = PlayerStatus::ConnectedSelf;
loop {
let timer_1 = std::time::Instant::now();
let mut buffer = [0; 1];
if stream.read(&mut buffer).unwrap() == 0 {
break;
}
let timer_2 = std::time::Instant::now();
match buffer[0] {
0x00 => {