mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
Prevent possible download counter race condition
This commit is contained in:
@@ -34,7 +34,7 @@ module.exports = async function(req, res) {
|
||||
if (dl >= dlimit) {
|
||||
await storage.del(id);
|
||||
} else {
|
||||
await storage.setField(id, 'dl', dl);
|
||||
await storage.incrementField(id, 'dl');
|
||||
}
|
||||
} catch (e) {
|
||||
log.info('StorageError:', id);
|
||||
|
||||
Reference in New Issue
Block a user