directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r688603 - /directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Date Mon, 25 Aug 2008 02:44:14 GMT
Author: akarasulu
Date: Sun Aug 24 19:44:14 2008
New Revision: 688603

URL: http://svn.apache.org/viewvc?rev=688603&view=rev
Log:
improving responsiveness of search to client death

Modified:
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=688603&r1=688602&r2=688603&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Sun Aug 24 19:44:14 2008
@@ -55,6 +55,9 @@
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.util.LdapURL;
+import org.apache.mina.common.IoService;
+import org.apache.mina.common.TrafficMask;
+import org.apache.mina.common.WriteFuture;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -369,6 +372,10 @@
             {
                 while ( cursor.next() )
                 {
+                    if ( session.getIoSession().isClosing() )
+                    {
+                        break;
+                    }
                     ClonedServerEntry entry = cursor.get();
                     session.getIoSession().write( generateResponse( session, req, entry )
);
                 }
@@ -378,6 +385,10 @@
                 int count = 0;
                 while ( cursor.next() )
                 {
+                    if ( session.getIoSession().isClosing() )
+                    {
+                        break;
+                    }
                     if ( count < sizeLimit )
                     {
                         ClonedServerEntry entry = cursor.get();



Mime
View raw message