From 0d566a1779183a479c33447ac6b0224b705a33c9 Mon Sep 17 00:00:00 2001
From: gbellato <gbellato@localhost>
Date: Mon, 18 Jun 2007 06:50:18 +0000
Subject: [PATCH] Fix for 1797 : dead locks during replication testing
---
opends/src/server/org/opends/server/replication/common/ServerState.java | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/common/ServerState.java b/opends/src/server/org/opends/server/replication/common/ServerState.java
index 1b5f36a..048891a 100644
--- a/opends/src/server/org/opends/server/replication/common/ServerState.java
+++ b/opends/src/server/org/opends/server/replication/common/ServerState.java
@@ -151,6 +151,7 @@
{
if (changeNumber == null)
return false;
+
synchronized(this)
{
Short id = changeNumber.getServerId();
@@ -181,9 +182,9 @@
public Set<String> toStringSet()
{
HashSet<String> set = new HashSet<String>();
+
synchronized (this)
{
-
for (Short key : list.keySet())
{
ChangeNumber change = list.get(key);
@@ -204,6 +205,7 @@
public ArrayList<ASN1OctetString> toASN1ArrayList()
{
ArrayList<ASN1OctetString> values = new ArrayList<ASN1OctetString>();
+
synchronized (this)
{
for (Short id : list.keySet())
@@ -215,7 +217,7 @@
return values;
}
/**
- * return the text representation of ServerState.
+ * Return the text representation of ServerState.
* @return the text representation of ServerState
*/
@Override
--
Gitblit v1.10.0