We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f61cc46 commit 65b6a5cCopy full SHA for 65b6a5c
src/main.rs
@@ -1,3 +1,9 @@
1
+/*
2
+MIT License
3
+
4
+Developed and implemented by AndcoolSystems, 2025
5
+*/
6
7
mod api;
8
mod byte_buf_utils;
9
mod config;
@@ -96,10 +102,11 @@ async fn main() -> anyhow::Result<()> {
96
102
let mut client = MinecraftServer::new(stream, keys.clone()).await?;
97
103
info!("New connection from: {}", addr);
98
104
105
+ let timeout_duration = Duration::from_secs(config.server.timeout);
99
106
tokio::spawn(async move {
100
107
// Setting client timeout
101
108
timeout(
- Duration::from_secs(config.server.timeout),
109
+ timeout_duration,
110
client.run()
111
).await.unwrap_or_else(|_| {error!("Connection from {} has been timed out", addr);})
112
});
0 commit comments