This commit is contained in:
zzz
2010-12-20 19:36:49 +00:00
parent ebe7f3b127
commit ad00c16f85

View File

@ -244,8 +244,9 @@ class PeerCheckerTask extends TimerTask
coordinator.setRateHistory(uploaded, downloaded);
// close out unused files, but we don't need to do it every time
if (random.nextInt(4) == 0)
coordinator.getStorage().cleanRAFs();
Storage storage = coordinator.getStorage();
if (storage != null && random.nextInt(4) == 0) {
storage.cleanRAFs();
}
}
}