diff --git a/src/dht.cpp b/src/dht.cpp index 0862224d3677f6087e369cf19e9d245a85d53b80..eb613a4d52907d822da58f2ae345924a44afb79b 100644 --- a/src/dht.cpp +++ b/src/dht.cpp @@ -1837,6 +1837,10 @@ Dht::storageStore(const InfoHash& id, const std::shared_ptr<Value>& value, time_ { const auto& now = scheduler.time(); created = std::min(created, now); + + if ( created + getType(value->id).expiration < clock::now() ) + return false; + auto st = findStorage(id); if (st == store.end()) { if (store.size() >= MAX_HASHES)