directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r755704 - /directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
Date Wed, 18 Mar 2009 19:07:13 GMT
Author: kayyagari
Date: Wed Mar 18 19:07:12 2009
New Revision: 755704

URL: http://svn.apache.org/viewvc?rev=755704&view=rev
Log:
added a flag to identify the voluntary/manual disconnect

Modified:
    directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java

Modified: directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java?rev=755704&r1=755703&r2=755704&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
(original)
+++ directory/apacheds/branches/apacheds-replication/mitosis/src/main/java/org/apache/directory/mitosis/syncrepl/SyncreplConsumer.java
Wed Mar 18 19:07:12 2009
@@ -104,6 +104,8 @@
     /** the cookie file */
     private File cookieFile;
     
+    /** flag to indicate whether the consumer was diconncted */
+    private boolean disconnected;
     
     /**
      * @return the config
@@ -394,7 +396,7 @@
 	                    LOG.debug( remoteEntry.toString() );
 	                    session.add( new DefaultServerEntry( directoryService.getRegistries(),
remoteEntry ) );
 	                }
-	                
+
 	                break;
             
             	case MODIFY :
@@ -493,6 +495,11 @@
      */
     public void handleSessionClosed()
     {
+        if( disconnected )
+        {
+            return;
+        }
+        
         boolean connected = false;
         
         while( !connected )
@@ -598,6 +605,8 @@
     
     public void disconnet()
     {
+        disconnected = true;
+
         try
         {
             connection.unBind();
@@ -613,6 +622,7 @@
         {
             LOG.error( "Failed to close the connection", e );
         }
+        
     }
 
 



Mime
View raw message