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

@ -269,7 +269,7 @@ project(':forge') {
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
environment 'LAUNCHER_VERSION', SPEC_VERSION
property 'org.lwjgl.system.SharedLibraryExtractDirectory', 'lwjgl_dll'
property 'eventbus.checkTypesOnDispatch', 'true'
property 'eventbus.checkTypesOnDispatch', 'true'
ideaModule "${rootProject.name}.${project.name}.userdev"
@ -304,7 +304,7 @@ project(':forge') {
environment 'FORGE_SPEC', SPEC_VERSION
environment 'FORGE_VERSION', project.version.substring(MC_VERSION.length() + 1).toString()
environment 'LAUNCHER_VERSION', SPEC_VERSION
property 'eventbus.checkTypesOnDispatch', 'true'
property 'eventbus.checkTypesOnDispatch', 'true'
ideaModule "${rootProject.name}.${project.name}.userdev"

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);
}