From f24118fad27564bc163fd5c4a2955ca36c73489c Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 12 Oct 2006 15:08:00 +0000
Subject: [PATCH] Update the server code to eliminate the need for a 5-second delay when attempting to terminate a client connection from within an operation plugin. The issue arose when the attempt to terminate the connection tried to cancel the operation that initiated the disconnect, which made it necessary to wait for a 5-second timeout before continuing.
---
opends/src/server/org/opends/server/core/AbandonOperation.java | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/AbandonOperation.java b/opends/src/server/org/opends/server/core/AbandonOperation.java
index 068fb60..0471a6f 100644
--- a/opends/src/server/org/opends/server/core/AbandonOperation.java
+++ b/opends/src/server/org/opends/server/core/AbandonOperation.java
@@ -35,6 +35,7 @@
import org.opends.server.types.CancelRequest;
import org.opends.server.types.CancelResult;
import org.opends.server.types.Control;
+import org.opends.server.types.DisconnectReason;
import org.opends.server.types.OperationType;
import org.opends.server.types.ResultCode;
import org.opends.server.types.operation.PostOperationAbandonOperation;
@@ -178,6 +179,22 @@
* {@inheritDoc}
*/
@Override()
+ public final void disconnectClient(DisconnectReason disconnectReason,
+ boolean sendNotification, String message,
+ int messageID)
+ {
+ // Since abandon operations can't be cancelled, we don't need to do anything
+ // but forward the request on to the client connection.
+ clientConnection.disconnect(disconnectReason, sendNotification, message,
+ messageID);
+ }
+
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override()
public final String[][] getRequestLogElements()
{
assert debugEnter(CLASS_NAME, "getRequestLogElements");
--
Gitblit v1.10.0