File tree Expand file tree Collapse file tree
vcell-client/src/main/java/cbit/vcell/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,6 +80,14 @@ private VCellClientMain() {
8080 * @param args an array of command-line arguments
8181 */
8282 public static void main (java .lang .String [] args ) {
83+ // Recover gracefully when DNS lookups fail transiently (e.g. laptop wake from sleep).
84+ // Java's default 10s negative-result cache combined with our continuous polling loop
85+ // wedges the client at "connecting…" until restart, because the polling interval is
86+ // shorter than the cache TTL so the cached failure never expires. A short positive
87+ // TTL still gives reasonable cache locality without holding stale entries indefinitely.
88+ java .security .Security .setProperty ("networkaddress.cache.ttl" , "30" );
89+ java .security .Security .setProperty ("networkaddress.cache.negative.ttl" , "0" );
90+
8391 System .out .println ("starting with arguments " + Arrays .asList (args ));
8492 int exitCode = 1 ;
8593 try {
You can’t perform that action at this time.
0 commit comments