This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch mvnd-1.x in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
commit 931844f3d2c2236e796d243ed99c666f2c48eeca Author: Guillaume Nodet <gno...@gmail.com> AuthorDate: Mon Nov 25 09:58:31 2024 +0100 Debug mode should provide better defaults for keepAlive and connectTimeout (fixes #1209) --- client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java index 912a05e9..a11dcbc1 100644 --- a/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java +++ b/client/src/main/java/org/mvndaemon/mvnd/client/DaemonConnector.java @@ -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();