mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-25 21:40:09 +00:00
Update mod.rs
This commit is contained in:
1 parent
38aaf29fe8
commit
190cc8f238
1 file changed
+5
-2
+5
-2
@@ -72,9 +72,11 @@ impl Server {
|
|||||||
let connect_runtime_handle = tokio::spawn(async move {
|
let connect_runtime_handle = tokio::spawn(async move {
|
||||||
loop {
|
loop {
|
||||||
match tcp_listener_ref.accept().await {
|
match tcp_listener_ref.accept().await {
|
||||||
Ok((socket, addr)) => {
|
Ok((mut socket, addr)) => {
|
||||||
info!("New client connected: {:?}", addr);
|
info!("New client connected: {:?}", addr);
|
||||||
|
|
||||||
|
socket.set_nodelay(true);
|
||||||
|
|
||||||
let mut client = Client::new(socket);
|
let mut client = Client::new(socket);
|
||||||
match client.authenticate(&config_ref).await {
|
match client.authenticate(&config_ref).await {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
@@ -182,8 +184,9 @@ impl Server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i, packet) in packets {
|
for (i, packet) in packets {
|
||||||
self.parse_packet(i, packet).await?
|
self.parse_packet(i, packet).await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
// I'm sorry for this code :(
|
// I'm sorry for this code :(
|
||||||
|
|||||||
Reference in new issue
Block a user