mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
fixed a problem with resource observer; probably coming from uncatched
exceptions within the apache library which appear only in concurrency environments.
This commit is contained in:
parent
c8d4a63604
commit
466d90ad42
|
@ -231,7 +231,9 @@ public class ResourceObserver {
|
|||
public long getSizeOfDataPath(final boolean cached) {
|
||||
if (cached && System.currentTimeMillis() - this.sizeOfDirectory_lastCountTime < 600000) return this.sizeOfDirectory_lastCountValue;
|
||||
this.sizeOfDirectory_lastCountTime = System.currentTimeMillis();
|
||||
this.sizeOfDirectory_lastCountValue = FileUtils.sizeOfDirectory(this.path);
|
||||
try {
|
||||
this.sizeOfDirectory_lastCountValue = FileUtils.sizeOfDirectory(this.path);
|
||||
} catch (Throwable e) {} // org.apache.commons.io.FileUtils.sizeOf calls sizes of files which are there temporary and may cause an exception. Thats a bug inside FileUtils
|
||||
return this.sizeOfDirectory_lastCountValue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user