forked from Qortal/qortal
Fixed occasional ConcurrentModificationException in the block archive reader.
This commit is contained in:
parent
01e4bf3a77
commit
cbe83987d8
@ -145,6 +145,7 @@ public class BlockArchiveReader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getFilenameForHeight(int height) {
|
private String getFilenameForHeight(int height) {
|
||||||
|
synchronized (this.fileListCache) {
|
||||||
Iterator it = this.fileListCache.entrySet().iterator();
|
Iterator it = this.fileListCache.entrySet().iterator();
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
Map.Entry pair = (Map.Entry) it.next();
|
Map.Entry pair = (Map.Entry) it.next();
|
||||||
@ -161,6 +162,7 @@ public class BlockArchiveReader {
|
|||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user