diff --git a/src/router/upload.rs b/src/router/upload.rs index 3620081..99e9354 100644 --- a/src/router/upload.rs +++ b/src/router/upload.rs @@ -78,7 +78,11 @@ async fn upload_to_zip( let record = UploadRecord::new(archive_path); records.insert(cache_name.clone(), record.clone()); - cache::write_to_cache(&records) + let records_cache = records.clone(); + // Manually drop the records mutex guard + drop(records); + + cache::write_to_cache(&records_cache) .await .map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?;