Debug mode should provide better defaults for keepAlive and connectTimeout (fixes #1209)

This commit is contained in:
Guillaume Nodet
2024-11-25 09:58:31 +01:00
parent a070d0c07d
commit 514cf3de02

View File

@@ -405,6 +405,12 @@ public class DaemonConnector {
address = host + ":" + iPort;
output.accept(Message.buildStatus("Daemon listening for debugger on address: " + address));
args.add("-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=" + address);
if (Environment.MVND_KEEP_ALIVE.getCommandLineOption(args) == null) {
System.setProperty(Environment.MVND_KEEP_ALIVE.getProperty(), "1h");
}
if (Environment.MVND_CONNECT_TIMEOUT.getCommandLineOption(args) == null) {
System.setProperty(Environment.MVND_CONNECT_TIMEOUT.getProperty(), "1h");
}
}
// jvm args
String jvmArgs = parameters.jvmArgs();