mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
IDEA: fix starting daemon with specified amount of memory
This commit is contained in:
parent
773d40aa37
commit
8c35ef0189
|
@ -68,7 +68,7 @@ public class TeaVMDaemonComponent implements ApplicationComponent {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
updateConfiguration(true, daemonMemory);
|
updateConfiguration(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public class TeaVMDaemonComponent implements ApplicationComponent {
|
||||||
if (daemonInfo != null) {
|
if (daemonInfo != null) {
|
||||||
daemonInfo.getProcess().destroy();
|
daemonInfo.getProcess().destroy();
|
||||||
daemonInfo = null;
|
daemonInfo = null;
|
||||||
updateConfiguration(false, daemonMemory);
|
updateConfiguration(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,11 +104,10 @@ public class TeaVMDaemonComponent implements ApplicationComponent {
|
||||||
configurationStorage.loadState(configuration);
|
configurationStorage.loadState(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateConfiguration(boolean daemonEnabled, int daemonMemory) {
|
private void updateConfiguration(boolean daemonEnabled) {
|
||||||
TeaVMWorkspaceConfigurationStorage configurationStorage = getConfigurationStorage();
|
TeaVMWorkspaceConfigurationStorage configurationStorage = getConfigurationStorage();
|
||||||
TeaVMJpsWorkspaceConfiguration configuration = configurationStorage.getState();
|
TeaVMJpsWorkspaceConfiguration configuration = configurationStorage.getState();
|
||||||
configuration.setDaemonEnabled(daemonEnabled);
|
configuration.setDaemonEnabled(daemonEnabled);
|
||||||
configuration.setDaemonMemory(daemonMemory);
|
|
||||||
configurationStorage.loadState(configuration);
|
configurationStorage.loadState(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user