File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
make/langtools/tools/javacserver/client Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 5151public class Client {
5252 private static final Log .Level LOG_LEVEL = Log .Level .INFO ;
5353
54- // Wait 2 seconds for response, before giving up on javac server.
55- private static final int CONNECTION_TIMEOUT = 2000 ;
56- private static final int MAX_CONNECT_ATTEMPTS = 3 ;
54+ // Wait 4 seconds for response, before giving up on javac server.
55+ private static final int CONNECTION_TIMEOUT = 4000 ;
56+ private static final int MAX_CONNECT_ATTEMPTS = 10 ;
5757 private static final int WAIT_BETWEEN_CONNECT_ATTEMPTS = 2000 ;
5858
5959 private final ClientConfiguration conf ;
@@ -130,7 +130,7 @@ private Socket tryConnect() throws IOException, InterruptedException {
130130 Log .error ("Connection attempt failed: " + ex .getMessage ());
131131 if (attempt >= MAX_CONNECT_ATTEMPTS ) {
132132 Log .error ("Giving up" );
133- throw new IOException ("Could not connect to server" , ex );
133+ throw new IOException ("Could not connect to server after " + MAX_CONNECT_ATTEMPTS + " attempts with timeout " + CONNECTION_TIMEOUT , ex );
134134 }
135135 }
136136 Thread .sleep (WAIT_BETWEEN_CONNECT_ATTEMPTS );
You can’t perform that action at this time.
0 commit comments