o removed an un-used method
o set the connection object to null after disconnecting


git-svn-id: https://svn.apache.org/repos/asf/directory/apacheds/branches/apacheds-replication@773252 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java b/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java
index b6489f5..a42db88 100644
--- a/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java
+++ b/syncrepl/src/main/java/org/apache/directory/server/syncrepl/SyncReplConsumer.java
@@ -148,19 +148,6 @@
     }
 
 
-    /**
-     * A helper method to check that we didn't get an error.
-     */
-    private static void checkldapResult( LdapConnection connection, LdapResult ldapResult ) throws IOException
-    {
-        if ( ldapResult.getResultCode() != ResultCodeEnum.SUCCESS )
-        {
-            LOG.debug( "failed to bind on the server : " + ldapResult );
-            quit( connection );
-        }
-    }
-
-
     public void init( DirectoryService directoryservice ) throws Exception
     {
         this.directoryService = directoryservice;
@@ -630,6 +617,7 @@
             connection.close();
             LOG.info( "Connection closed for the server {}", config.getProviderHost() );
 
+            connection = null;
             // persist the cookie
             storeCookie();
         }