From a5131f44a6afa554af8f4c82c7ffd3d4ceac1bd4 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 04 Feb 2011 12:50:58 +0000
Subject: [PATCH] OPEN - issue OPENDJ-26: Fix OpenDS issue 4585: ConcurrentModificationException in ReplicationBroker https://bugster.forgerock.org/jira/browse/OPENDJ-26
---
opends/src/server/org/opends/server/replication/protocol/HeartbeatMonitor.java | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/HeartbeatMonitor.java b/opends/src/server/org/opends/server/replication/protocol/HeartbeatMonitor.java
index 518435b..5a0688b 100644
--- a/opends/src/server/org/opends/server/replication/protocol/HeartbeatMonitor.java
+++ b/opends/src/server/org/opends/server/replication/protocol/HeartbeatMonitor.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2007-2009 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
*/
package org.opends.server.replication.protocol;
@@ -54,25 +55,25 @@
/**
* The session on which heartbeats are to be monitored.
*/
- private ProtocolSession session;
+ private final ProtocolSession session;
/**
* The time in milliseconds between heartbeats from the replication
* server. Zero means heartbeats are off.
*/
- private long heartbeatInterval;
+ private final long heartbeatInterval;
/**
* Set this to stop the thread.
*/
- private boolean shutdown = false;
+ private volatile boolean shutdown = false;
/**
* Send StopMsg before session closure or not.
*/
- private boolean sendStopBeforeClose = false;
+ private final boolean sendStopBeforeClose;
/**
@@ -131,7 +132,8 @@
try
{
session.publish(new StopMsg());
- } catch(IOException ioe)
+ }
+ catch (IOException ioe)
{
// Anyway, going to close session, so nothing to do
}
--
Gitblit v1.10.0