mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-09 19:55:34 +00:00
Prevent possible download counter race condition
This commit is contained in:
@@ -62,6 +62,10 @@ class DB {
|
||||
this.redis.hset(id, key, value);
|
||||
}
|
||||
|
||||
incrementField(id, key, increment = 1) {
|
||||
this.redis.hincrby(id, key, increment);
|
||||
}
|
||||
|
||||
async del(id) {
|
||||
const filePath = await this.getPrefixedId(id);
|
||||
this.storage.del(filePath);
|
||||
|
||||
Reference in New Issue
Block a user