Fix CollaborationManager.shutdown() bug and ctor exception handling by Case

This commit is contained in:
Richard Cordovano 2015-06-24 11:46:58 -04:00
parent f196a6c05c
commit 641e33cf51
2 changed files with 1 additions and 2 deletions

View File

@ -306,7 +306,6 @@ public class Case {
eventPublisher.openRemoteEventChannel(String.format(EVENT_CHANNEL_NAME, newCase.getTextIndexName())); eventPublisher.openRemoteEventChannel(String.format(EVENT_CHANNEL_NAME, newCase.getTextIndexName()));
currentCase.collaborationMonitor = new CollaborationMonitor(); currentCase.collaborationMonitor = new CollaborationMonitor();
} catch (AutopsyEventException | CollaborationMonitor.CollaborationMonitorException ex) { } catch (AutopsyEventException | CollaborationMonitor.CollaborationMonitorException ex) {
currentCase.collaborationMonitor.shutdown();
logger.log(Level.SEVERE, "Failed to setup for collaboration", ex); logger.log(Level.SEVERE, "Failed to setup for collaboration", ex);
MessageNotifyUtil.Notify.error(NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.Title"), NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.ErrMsg")); MessageNotifyUtil.Notify.error(NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.Title"), NbBundle.getMessage(Case.class, "Case.CollaborationSetup.FailNotify.ErrMsg"));
} }

View File

@ -173,7 +173,7 @@ final class CollaborationMonitor {
} }
Case.removeEventSubscriber(CASE_EVENTS_OF_INTEREST, localTasksManager); Case.removeEventSubscriber(CASE_EVENTS_OF_INTEREST, localTasksManager);
eventPublisher.removeSubscriber(COLLABORATION_MONITOR_EVENT, remoteTasksManager); IngestManager.getInstance().removeIngestJobEventListener(localTasksManager);
if (null != eventPublisher) { if (null != eventPublisher) {
eventPublisher.removeSubscriber(COLLABORATION_MONITOR_EVENT, remoteTasksManager); eventPublisher.removeSubscriber(COLLABORATION_MONITOR_EVENT, remoteTasksManager);