Skip to content

Commit 65b6a5c

Browse files
chore: Added some comments
1 parent f61cc46 commit 65b6a5c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
MIT License
3+
4+
Developed and implemented by AndcoolSystems, 2025
5+
*/
6+
17
mod api;
28
mod byte_buf_utils;
39
mod config;
@@ -96,10 +102,11 @@ async fn main() -> anyhow::Result<()> {
96102
let mut client = MinecraftServer::new(stream, keys.clone()).await?;
97103
info!("New connection from: {}", addr);
98104

105+
let timeout_duration = Duration::from_secs(config.server.timeout);
99106
tokio::spawn(async move {
100107
// Setting client timeout
101108
timeout(
102-
Duration::from_secs(config.server.timeout),
109+
timeout_duration,
103110
client.run()
104111
).await.unwrap_or_else(|_| {error!("Connection from {} has been timed out", addr);})
105112
});

0 commit comments

Comments
 (0)