From ce949f4b26b4c2adcaae36784180e15a3d68abde Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 07 Oct 2011 10:09:52 +0000
Subject: [PATCH] Fix OPENDJ-115: Make replication connection timeouts and various monitoring intervals configurable

---
 opends/src/server/org/opends/server/replication/service/ReplicationBroker.java |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java b/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
index 6bc7cce..6e254d8 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
@@ -68,6 +68,7 @@
 import org.opends.server.replication.common.RSInfo;
 import org.opends.server.replication.common.ServerState;
 import org.opends.server.replication.common.ServerStatus;
+import org.opends.server.replication.plugin.MultimasterReplication;
 import org.opends.server.replication.protocol.*;
 import org.opends.server.types.DebugLogLevel;
 import org.opends.server.util.ServerConstants;
@@ -1198,9 +1199,9 @@
       socket = new Socket();
       socket.setReceiveBufferSize(1000000);
       socket.setTcpNoDelay(true);
-      socket.connect(serverAddr, ReplSessionSecurity.CONNECTION_TIMEOUT);
-      localSession = replSessionSecurity.createClientSession(
-          socket, ReplSessionSecurity.HANDSHAKE_TIMEOUT);
+      int timeoutMS = MultimasterReplication.getConnectionTimeoutMS();
+      socket.connect(serverAddr, timeoutMS);
+      localSession = replSessionSecurity.createClientSession(socket, timeoutMS);
       boolean isSslEncryption = replSessionSecurity
           .isSslEncryption(server);
 

--
Gitblit v1.10.0