mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 12:28:42 +00:00
storage: remove previous value size from quota when appropriate
This commit is contained in:
1 parent
a2dff6a123
commit
3e407e65fa
1 file changed
+1
-1
+1
-1
@@ -224,7 +224,7 @@ Storage::store(const InfoHash& id, const Sp<Value>& value, time_point created, t
|
||||
//DHT_LOG.DEBUG("Updating %s -> %s", id.toString().c_str(), value->toString().c_str());
|
||||
// clear quota for previous value
|
||||
if (it->store_bucket)
|
||||
it->store_bucket->erase(id, *value, it->expiration);
|
||||
it->store_bucket->erase(id, *it->data, it->expiration);
|
||||
it->expiration = expiration;
|
||||
// update quota for new value
|
||||
it->store_bucket = sb;
|
||||
|
||||
Reference in new issue
Block a user