Postpone restart after plugin (de)installation

This commit is contained in:
Rene Pfeuffer
2019-11-22 15:43:58 +01:00
parent 8054540544
commit aedf34c581

View File

@@ -243,7 +243,13 @@ public class DefaultPluginManager implements PluginManager {
}
private void restart(String cause) {
eventBus.post(new RestartEvent(PluginManager.class, cause));
new Thread(() -> {
try {
Thread.sleep(200);
} catch (InterruptedException e) {
}
eventBus.post(new RestartEvent(PluginManager.class, cause));
}).start();
}
private void cancelPending(List<PendingPluginInstallation> pendingInstallations) {