Future comment

This commit is contained in:
Jedrzej Stuczynski
2019-12-12 15:14:04 +00:00
parent 96f5d45877
commit fbb675e815
+2
View File
@@ -117,6 +117,8 @@ impl ClientStorage {
}
// TODO: THIS NEEDS A LOCKING MECHANISM!!! (or a db layer on top - basically 'ClientStorage' on steroids)
// TODO 2: This should only be called AFTER we sent the reply. Because if client's connection failed after sending request
// the messages would be deleted but he wouldn't have received them
fn delete_file(path: PathBuf) {
println!("Here {:?} will be deleted!", path);
std::fs::remove_file(path); // another argument for db layer -> remove_file is NOT guaranteed to immediately get rid of the file