Skip to content

Commit 87e7c81

Browse files
authored
honor connect timeout indexer option for webapp check (#4220)
1 parent 5f85c70 commit 87e7c81

File tree

1 file changed

+1
-3
lines changed
  • opengrok-indexer/src/main/java/org/opengrok/indexer/index

1 file changed

+1
-3
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/index/Indexer.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,6 @@ public final class Indexer {
150150
private static final String[] LUCENE_LOCKS = {ON, OFF, "simple", "native"};
151151
private static final String OPENGROK_JAR = "opengrok.jar";
152152

153-
private static final int WEBAPP_CONNECT_TIMEOUT = 3000; // in milliseconds
154-
155153
public static Indexer getInstance() {
156154
return indexer;
157155
}
@@ -174,7 +172,7 @@ public static void main(String[] argv) {
174172
try {
175173
argv = parseOptions(argv);
176174

177-
if (webappURI != null && !HostUtil.isReachable(webappURI, WEBAPP_CONNECT_TIMEOUT,
175+
if (webappURI != null && !HostUtil.isReachable(webappURI, cfg.getConnectTimeout(),
178176
cfg.getIndexerAuthenticationToken())) {
179177
System.err.println(webappURI + " is not reachable and the -U option was specified, exiting.");
180178
System.exit(1);

0 commit comments

Comments
 (0)