mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

ludovicp
29.35.2010 7c30dbb5403772b323df3ad907d9ed15d23b5aee
opends/src/server/org/opends/server/replication/server/DataServerHandler.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 *      Copyright 2006-2010 Sun Microsystems, Inc.
 */
package org.opends.server.replication.server;
@@ -494,18 +494,21 @@
      boolean sessionInitiatorSSLEncryption =
        processStartFromRemote(inServerStartMsg);
      /**
       * Hack to be sure that if a server disconnects and reconnect, we
       * let the reader thread see the closure and cleanup any reference
       * to old connection. This must be done before taking the domain lock so
       * that the reader thread has a chance to stop the handler.
       */
      replicationServerDomain.
      waitDisconnection(inServerStartMsg.getServerId());
      // lock with no timeout
      lockDomain(false);
      localGenerationId = replicationServerDomain.getGenerationId();
      oldGenerationId = localGenerationId;
      // Hack to be sure that if a server disconnects and reconnect, we
      // let the reader thread see the closure and cleanup any reference
      // to old connection
      replicationServerDomain.
      waitDisconnection(inServerStartMsg.getServerId());
      // Duplicate server ?
      if (!replicationServerDomain.checkForDuplicateDS(this))
      {