diff --git a/history.txt b/history.txt index b97b2a3788..4e545bbbc6 100644 --- a/history.txt +++ b/history.txt @@ -1,5 +1,6 @@ 2015-06-20 dg * I2PSnark: Auto-start now only starts torrents which were running at shutdown (#766) + * NetDB: Don't say we stored, and don't flood, if we're shutting down 2015-06-19 zzz * I2CP: Fix simple session lookups, broken in prop @@ -37,6 +38,7 @@ Prop from i2p.i2p.zzz.multisess: - Improve routing of DatabaseStoreMessage acks - Send our own RI unsolicited in reply if we aren't floodfill - Don't ack or flood a store of an unknown type + - Don't say we stored, and don't flood if we're shutting down * PeerTestJob: Don't generate zero reply token * Timestamper: Reduce NTP timeouts to shorten startup time when NTP is blocked diff --git a/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java b/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java index 322ad4bbbd..29e4c789dc 100644 --- a/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java +++ b/router/java/src/net/i2p/router/networkdb/kademlia/HandleFloodfillDatabaseStoreMessageJob.java @@ -216,6 +216,7 @@ public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl { // flood it if (invalidMessage == null && getContext().netDb().floodfillEnabled() && + !getContext().router().gracefulShutdownInProgress() && _message.getReplyToken() > 0) { if (wasNew) { // DOS prevention @@ -251,7 +252,7 @@ public class HandleFloodfillDatabaseStoreMessageJob extends JobImpl { TunnelId replyTunnel = _message.getReplyTunnel(); // A store of our own RI, only if we are not FF DatabaseStoreMessage msg2; - if (getContext().netDb().floodfillEnabled() || + if ((getContext().netDb().floodfillEnabled() && !getContext().router().gracefulShutdownInProgress()) || storedKey.equals(getContext().routerHash())) { // don't send our RI if the store was our RI (from PeerTestJob) msg2 = null;