From 296090552c8bb9ad83cfa819fbf0bd9d0ba8fac2 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 18 Apr 2011 15:55:45 +0000
Subject: [PATCH] Fix OpenDJ-117: IllegalMonitorStateException during server shutdown
---
opends/src/server/org/opends/server/replication/server/ECLServerHandler.java | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java b/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
index b0df1e3..624c058 100644
--- a/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
+++ b/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -486,13 +486,13 @@
StartECLSessionMsg inStartECLSessionMsg =
waitAndProcessStartSessionECLFromRemoteServer();
if (inStartECLSessionMsg == null)
- {
- // client wants to properly close the connection (client sent a
- // StopMsg)
- logStopReceived();
- abortStart(null);
- return;
- }
+ {
+ // client wants to properly close the connection (client sent a
+ // StopMsg)
+ logStopReceived();
+ abortStart(null);
+ return;
+ }
logStartECLSessionHandshake(inStartECLSessionMsg);
@@ -539,17 +539,20 @@
// client wants to stop handshake (was just for handshake phase one for RS
// choice). Return null to make the session be terminated.
return null;
- } else if (!(msg instanceof StartECLSessionMsg))
- {
- Message message = Message.raw(
- "Protocol error: StartECLSessionMsg required." + msg + " received.");
- abortStart(message);
}
-
- // Process StartSessionMsg sent by remote DS
- StartECLSessionMsg startECLSessionMsg = (StartECLSessionMsg) msg;
-
- return startECLSessionMsg;
+ else if (!(msg instanceof StartECLSessionMsg))
+ {
+ Message message = Message
+ .raw("Protocol error: StartECLSessionMsg required." + msg
+ + " received.");
+ abortStart(message);
+ return null;
+ }
+ else
+ {
+ // Process StartSessionMsg sent by remote DS
+ return (StartECLSessionMsg) msg;
+ }
}
/**
--
Gitblit v1.10.0