From 1c5742d0d3493faf8f2f2723d0c6c3df088cc80e Mon Sep 17 00:00:00 2001
From: mrossign <mrossign@localhost>
Date: Thu, 24 Jan 2008 15:28:25 +0000
Subject: [PATCH] Fix for #2863: Processes remain after stopping all replication servers at the same time
---
opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java b/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
index 1a98549..a8eb808 100644
--- a/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
+++ b/opends/src/server/org/opends/server/replication/plugin/ReplicationBroker.java
@@ -204,11 +204,7 @@
HashMap<String, ServerState> rsStates = new HashMap<String, ServerState>();
// Stop any existing heartbeat monitor from a previous session.
- if (heartbeatMonitor != null)
- {
- heartbeatMonitor.shutdown();
- heartbeatMonitor = null;
- }
+ stopHeartBeat();
synchronized (connectPhaseLock)
{
@@ -753,6 +749,18 @@
}
/**
+ * Stop the heartbeat monitor thread.
+ */
+ void stopHeartBeat()
+ {
+ if (heartbeatMonitor != null)
+ {
+ heartbeatMonitor.shutdown();
+ heartbeatMonitor = null;
+ }
+ }
+
+ /**
* restart the ReplicationBroker.
*/
public void reStart()
@@ -987,10 +995,6 @@
replicationServer = "stopped";
shutdown = true;
connected = false;
- if (heartbeatMonitor != null)
- {
- heartbeatMonitor.shutdown();
- }
try
{
if (debugEnabled())
--
Gitblit v1.10.0