Skip to content

Commit

Permalink
Uses its own yaml parameter, defaults back 15 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
nmuesch committed Mar 7, 2018
1 parent 647736b commit 25b7061
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/org/datadog/jmxfetch/RemoteConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class RemoteConnection extends Connection {
private String rmi_timeout;
private static final String TRUST_STORE_PATH_KEY = "trust_store_path";
private static final String TRUST_STORE_PASSWORD_KEY = "trust_store_password";
private static final String DEFAULT_RMI_RESPONSE_TIMEOUT = "600000"; //Match the refresh_beans default
private static final String DEFAULT_RMI_RESPONSE_TIMEOUT = "15000"; //Match the collection period default
private final static Logger LOGGER = Logger.getLogger(Connection.class.getName());

public RemoteConnection(LinkedHashMap<String, Object> connectionParams)
Expand All @@ -35,10 +35,10 @@ public RemoteConnection(LinkedHashMap<String, Object> connectionParams)
user = (String) connectionParams.get("user");
password = (String) connectionParams.get("password");
jmx_url = (String) connectionParams.get("jmx_url");
rmi_timeout = (String) connectionParams.get("refresh_beans");
if (rmi_timeout == null) {
rmi_timeout = DEFAULT_RMI_RESPONSE_TIMEOUT;
}
rmi_timeout = (String) connectionParams.get("rmi_client_timeout");
if (rmi_timeout == null) {
rmi_timeout = DEFAULT_RMI_RESPONSE_TIMEOUT;
}
if (connectionParams.containsKey("path")){
path = (String) connectionParams.get("path");
}
Expand Down

0 comments on commit 25b7061

Please sign in to comment.