From 3e407e65fa27afbbeec04cdf055d4342ad93b258 Mon Sep 17 00:00:00 2001 From: Adrien Beraud Date: Thu, 22 May 2025 11:36:16 -0400 Subject: [PATCH] storage: remove previous value size from quota when appropriate --- src/storage.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage.h b/src/storage.h index dc5f2d94..5e7f034f 100644 --- a/src/storage.h +++ b/src/storage.h @@ -224,7 +224,7 @@ Storage::store(const InfoHash& id, const Sp& 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;