Author: j16sdiz
Date: 2008-06-13 12:22:40 +0000 (Fri, 13 Jun 2008)
New Revision: 20288

Modified:
   
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
Log:
always write config file in cleaner, this preserve the key count on crash


Modified: 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java
===================================================================
--- 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-06-13 12:20:09 UTC (rev 20287)
+++ 
branches/saltedhashstore/freenet/src/freenet/store/SaltedHashFreenetStore.java  
    2008-06-13 12:22:40 UTC (rev 20288)
@@ -842,6 +842,12 @@
                                                Logger.debug(this, 
"interrupted", e);
                                        }
                                }
+                               
+                               try {
+                                       writeConfigFile();
+                               } catch (IOException e) {
+                                       Logger.error(this, "Can't write config 
file", e);
+                               }
                        }
                }

@@ -900,10 +906,6 @@
                        try {
                                assert _prevStoreSize == prevStoreSize;
                                prevStoreSize = 0;
-                               writeConfigFile();
-                       } catch (IOException e) {
-                               Logger.error(this, "Can't write config file", 
e);
-                               prevStoreSize = _prevStoreSize; // try again ?
                        } finally {
                                configLock.writeLock().unlock();
                        }


Reply via email to