wip downloading (it doesnt work)

This commit is contained in:
Luuk van Oijen
2023-11-08 21:35:13 +01:00
parent ebc0dba4ef
commit 5011ae280c
9 changed files with 110 additions and 18 deletions

View File

@@ -80,11 +80,11 @@ impl Server {
let ci_ref = clients_incoming_ref.clone();
set.spawn(async move {
socket.set_nodelay(true);
socket.set_nodelay(true); // TODO: Is this good?
let mut client = Client::new(socket);
match client.authenticate(&cfg_ref).await {
Ok(_) => {
Ok(b) if b => {
let mut lock = ci_ref
.lock()
.map_err(|e| error!("{:?}", e))
@@ -92,6 +92,9 @@ impl Server {
lock.push(client);
drop(lock);
},
Ok(b) => {
debug!("Downloader?");
},
Err(e) => {
error!("Authentication error occured, kicking player...");
error!("{:?}", e);