HashDB panel reverts only if ingest is not running. Prevents bug that closes DB while still in use.

This commit is contained in:
Brian Carrier 2014-06-30 10:13:11 -04:00
parent 6ab5fef8f8
commit 46f8fd99fd

View File

@ -269,9 +269,15 @@ public final class HashLookupSettingsPanel extends IngestModuleGlobalSettingsPan
}
public void cancel() {
HashDbManager.getInstance().loadLastSavedConfiguration();
/* Revert back to last settings only if the user could have
* made changes. Doing this while ingest is running causes
* hash dbs to be closed while they are still being used.
*/
if (IngestManager.getInstance().isIngestRunning() == false) {
HashDbManager.getInstance().loadLastSavedConfiguration();
}
}
void removeThese(List<HashDb> toRemove) {
for (HashDb hashDb : toRemove) {
hashSetManager.removeHashDatabaseInternal(hashDb);