I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 438ea1b2 authored by zzz's avatar zzz
Browse files

fix db writes to disk broken in last checkin

parent b7e2d3a1
No related branches found
No related tags found
No related merge requests found
......@@ -193,9 +193,11 @@ class PersistentDataStore extends TransientDataStore {
while (true) {
// get a new iterator every time to get a random entry without
// having concurrency issues or copying to a List or Array
Iterator<Hash> iter = _keys.keySet().iterator();
Iterator<Map.Entry<Hash, DataStructure>> iter = _keys.entrySet().iterator();
try {
key = iter.next();
Map.Entry<Hash, DataStructure> entry = iter.next();
key = entry.getKey();
data = entry.getValue();
iter.remove();
count++;
} catch (NoSuchElementException nsee) {
......@@ -207,7 +209,6 @@ class PersistentDataStore extends TransientDataStore {
}
if (key != null) {
data = _keys.get(key);
if (data != null) {
write(key, data);
data = null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment