mirror of
https://github.com/illegitimate-egg/mcrizzledizzle.git
synced 2026-06-04 15:43:57 +00:00
Cleanup
This commit is contained in:
parent
72fe7e13f1
commit
1cd4faafee
@ -2,8 +2,7 @@ use log::{info, warn};
|
|||||||
use std::io::prelude::*;
|
use std::io::prelude::*;
|
||||||
use std::net::TcpStream;
|
use std::net::TcpStream;
|
||||||
use std::sync::{Arc, Mutex};
|
use std::sync::{Arc, Mutex};
|
||||||
use std::thread::{self, sleep};
|
use std::thread;
|
||||||
use std::time::Duration;
|
|
||||||
|
|
||||||
use crate::command::handle_command;
|
use crate::command::handle_command;
|
||||||
use crate::config::ServerConfig;
|
use crate::config::ServerConfig;
|
||||||
@ -47,12 +46,10 @@ pub fn handle_client(
|
|||||||
player_statuses[client_number as usize] = PlayerStatus::ConnectedSelf;
|
player_statuses[client_number as usize] = PlayerStatus::ConnectedSelf;
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
let timer_1 = std::time::Instant::now();
|
|
||||||
let mut buffer = [0; 1];
|
let mut buffer = [0; 1];
|
||||||
if stream.read(&mut buffer).unwrap() == 0 {
|
if stream.read(&mut buffer).unwrap() == 0 {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
let timer_2 = std::time::Instant::now();
|
|
||||||
|
|
||||||
match buffer[0] {
|
match buffer[0] {
|
||||||
0x00 => {
|
0x00 => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user