From 15200804c06b26016c515617700a46bf5badb6ca Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Thu, 28 May 2009 06:38:25 +0000
Subject: [PATCH] Fix for 4015 : wrong error messages when replication heart-beat fails

---
 opends/src/server/org/opends/server/replication/service/ReplicationBroker.java |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 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 78a036e..c20eced 100644
--- a/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
+++ b/opends/src/server/org/opends/server/replication/service/ReplicationBroker.java
@@ -1392,14 +1392,17 @@
       {
         if (shutdown == false)
         {
-          Message message =
-            NOTE_DISCONNECTED_FROM_CHANGELOG.get(replicationServer,
-            Short.toString(rsServerId), baseDn.toString(),
-            Short.toString(serverId));
-          logError(message);
-
-          debugInfo("ReplicationBroker.receive() " + baseDn +
-            " Exception raised: " + e.getLocalizedMessage());
+          if (!session.closeInitiated())
+          {
+            /*
+             * If we did not initiate the close on our side, log a message.
+             */
+            Message message =
+              NOTE_DISCONNECTED_FROM_CHANGELOG.get(replicationServer,
+                  Short.toString(rsServerId), baseDn.toString(),
+                  Short.toString(serverId));
+            logError(message);
+          }
           this.reStart(failingSession);
         }
       }
@@ -1613,7 +1616,7 @@
 
   private boolean debugEnabled()
   {
-    return true;
+    return false;
   }
 
   private static final void debugInfo(String s)

--
Gitblit v1.10.0