From e097a1caeb6e5b44d20fc8e805afee4e88dc39aa Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sun, 6 Apr 2014 15:15:23 +0000
Subject: [PATCH] NetDB: Skip LS verifies when shutting down remove unneeded
 null check

---
 .../i2p/router/networkdb/kademlia/FloodfillStoreJob.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillStoreJob.java b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillStoreJob.java
index b9acaca3e5..5618d25645 100644
--- a/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillStoreJob.java
+++ b/router/java/src/net/i2p/router/networkdb/kademlia/FloodfillStoreJob.java
@@ -56,12 +56,16 @@ class FloodfillStoreJob extends StoreJob {
     protected void succeed() {
         super.succeed();
 
-        if (_state != null) {
             if (_facade.isVerifyInProgress(_state.getTarget())) {
                 if (_log.shouldLog(Log.INFO))
                     _log.info("Skipping verify, one already in progress for: " + _state.getTarget());
                 return;
             }
+            if (getContext().router().gracefulShutdownInProgress()) {
+                if (_log.shouldLog(Log.INFO))
+                    _log.info("Skipping verify, shutdown in progress for: " + _state.getTarget());
+                return;
+            }
             // Get the time stamp from the data we sent, so the Verify job can meke sure that
             // it finds something stamped with that time or newer.
             DatabaseEntry data = _state.getData();
@@ -81,7 +85,6 @@ class FloodfillStoreJob extends StoreJob {
             } catch (NoSuchElementException nsee) {}
             getContext().jobQueue().addJob(new FloodfillVerifyStoreJob(getContext(), _state.getTarget(),
                                                                        published, isRouterInfo, sentTo, _facade));
-        }
     }
     
     @Override
-- 
GitLab