mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -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) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
updateConfiguration(true, daemonMemory);
|
||||
updateConfiguration(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,7 +76,7 @@ public class TeaVMDaemonComponent implements ApplicationComponent {
|
|||
if (daemonInfo != null) {
|
||||
daemonInfo.getProcess().destroy();
|
||||
daemonInfo = null;
|
||||
updateConfiguration(false, daemonMemory);
|
||||
updateConfiguration(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -104,11 +104,10 @@ public class TeaVMDaemonComponent implements ApplicationComponent {
|
|||
configurationStorage.loadState(configuration);
|
||||
}
|
||||
|
||||
private void updateConfiguration(boolean daemonEnabled, int daemonMemory) {
|
||||
private void updateConfiguration(boolean daemonEnabled) {
|
||||
TeaVMWorkspaceConfigurationStorage configurationStorage = getConfigurationStorage();
|
||||
TeaVMJpsWorkspaceConfiguration configuration = configurationStorage.getState();
|
||||
configuration.setDaemonEnabled(daemonEnabled);
|
||||
configuration.setDaemonMemory(daemonMemory);
|
||||
configurationStorage.loadState(configuration);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user