Fix another case of swallowed errors not shutting down mods.

This commit is contained in:
LexManos 2020-07-28 16:44:29 -07:00
parent 7592bbe87e
commit e62805f1d7
2 changed files with 3 additions and 3 deletions

View File

@ -132,7 +132,7 @@ public class ModList
DeferredWorkQueue.clear();
try
{
final ForkJoinTask<?> parallelTask = modLoadingThreadPool.submit(() -> this.mods.parallelStream().forEach(m -> m.transitionState(lifecycleEvent, errorHandler)));
final ForkJoinTask<?> parallelTask = modLoadingThreadPool.submit(() -> this.mods.parallelStream().forEach(m -> m.transitionState(lifecycleEvent, errorHandler.andThen(e -> this.mods.forEach(ModContainer::shutdown)))));
while (ticker != null && !parallelTask.isDone()) {
executor.execute(ticker);
}