Updated deps, changed writer to maybe block less

This commit is contained in:
G2-Games 2025-02-25 11:31:59 -06:00
parent dbb76a4062
commit f171051d54
3 changed files with 3 additions and 4 deletions

View file

@ -1,10 +1,10 @@
[package] [package]
name = "confetti_box" name = "confetti_box"
version = "0.2.0" version = "0.2.1"
repository = "https://github.com/Dangoware/confetti-box" repository = "https://github.com/Dangoware/confetti-box"
license = "AGPL-3.0-or-later" license = "AGPL-3.0-or-later"
authors.workspace = true authors.workspace = true
edition = "2021" edition = "2024"
[lints] [lints]
workspace = true workspace = true

View file

@ -377,7 +377,7 @@ impl Chunkbase {
} }
pub fn get_file(&self, uuid: &Uuid) -> Option<&(DateTime<Utc>, ChunkedInfo)> { pub fn get_file(&self, uuid: &Uuid) -> Option<&(DateTime<Utc>, ChunkedInfo)> {
self.chunks.get(&uuid) self.chunks.get(uuid)
} }
pub fn remove_file(&mut self, uuid: &Uuid) -> Result<bool, io::Error> { pub fn remove_file(&mut self, uuid: &Uuid) -> Result<bool, io::Error> {

View file

@ -309,7 +309,6 @@ pub async fn websocket_upload(
stream.send(rocket_ws::Message::Text(json::serde_json::ser::to_string(&offset).unwrap())).await.unwrap(); stream.send(rocket_ws::Message::Text(json::serde_json::ser::to_string(&offset).unwrap())).await.unwrap();
file.write_all(&message).await.unwrap(); file.write_all(&message).await.unwrap();
file.flush().await?;
chunk_db.write().unwrap().extend_timeout(&uuid, TimeDelta::seconds(30)); chunk_db.write().unwrap().extend_timeout(&uuid, TimeDelta::seconds(30));
} }