From f0b6638466bdedb85fc02906b4aaa1fe80a08cc3 Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Mon, 2 Oct 2023 17:43:41 -0400 Subject: [PATCH] Router: check \!isClientDb() in KNDF before calling remove --- .../networkdb/kademlia/KademliaNetworkDatabaseFacade.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java b/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java index 59064aac8e..bc0e50d4f7 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/KademliaNetworkDatabaseFacade.java @@ -1440,9 +1440,9 @@ public void fail(Hash dbEntry) { // are any updates if (_log.shouldLog(Log.INFO)) _log.info("Dropping a lease: " + dbEntry); - try { + if (!isClientDb()) { _ds.remove(dbEntry, false); - } catch (UnsupportedOperationException uoe) { + } else { // if this happens it's because we're a TransientDataStore instead, // so just call remove without the persist option. _ds.remove(dbEntry);