From 9d89382aa31ab562458df1095f77cd081b64f66a Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Wed, 16 Sep 2009 10:26:07 +0000
Subject: [PATCH] Fix a regression introduced by fix for 4223 During the creation of a replicationServerDomain, wait for the replication server  to connect to other replication servers only if the creation was initiated by a  directory server.

---
 opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
index 3e8dd62..5cc04e7 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServerDomain.java
@@ -3061,24 +3061,21 @@
     try
     {
       storeReceivedCTHeartbeat(msg.getChangeNumber());
-
-      // If we are the first replication server warned,
-      // then forwards the reset message to the remote replication servers
-      for (ReplicationServerHandler rsHandler : replicationServers.values())
+      if (senderHandler.isDataServer())
       {
-        try
+        // If we are the first replication server warned,
+        // then forwards the reset message to the remote replication servers
+        for (ReplicationServerHandler rsHandler : replicationServers.values())
         {
-          // After we'll have sent the message , the remote RS will adopt
-          // the new genId
-          if (senderHandler.isDataServer())
+          try
           {
             rsHandler.send(msg);
+          } catch (IOException e)
+          {
+            TRACER.debugCaught(DebugLogLevel.ERROR, e);
+            logError(ERR_CHANGELOG_ERROR_SENDING_MSG.get(rsHandler.getName()));
+            stopServer(rsHandler);
           }
-        } catch (IOException e)
-        {
-          TRACER.debugCaught(DebugLogLevel.ERROR, e);
-          logError(ERR_CHANGELOG_ERROR_SENDING_MSG.get(rsHandler.getName()));
-          stopServer(rsHandler);
         }
       }
     }

--
Gitblit v1.10.0