Skip to content

Commit

Permalink
[JBPM-10187] Gonzalo comments
Browse files Browse the repository at this point in the history
Co-authored-by: Gonzalo Muñoz <gmunozfe@redhat.com>
  • Loading branch information
fjtirado and gmunozfe committed Oct 26, 2023
1 parent e3c32e8 commit f21a8d7
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,13 @@ public void signalEvent(String type, Object event) {
Set<Object> enginesToDelete = new HashSet<>();
for (Entry<Object, RuntimeEngine> engine : activeEngines) {
RuntimeEngineImpl engineImpl = (RuntimeEngineImpl) engine.getValue();
if (engineImpl==null) {
continue;
}
if (engineImpl.isDisposed() || engineImpl.isInvalid()) {
enginesToDelete.add(engine.getKey());
Object engineKey = engine.getKey();
logger.trace("Engine with key {} is not longer valid", engineKey);
enginesToDelete.add(engineKey);
continue;
}
Context<?> context = engineImpl.getContext();
Expand All @@ -221,6 +226,7 @@ public void signalEvent(String type, Object event) {
}
}
if (!enginesToDelete.isEmpty()) {

currentlyActive.keySet().removeAll(enginesToDelete);
}
}
Expand Down

0 comments on commit f21a8d7

Please sign in to comment.