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

Valery Kharseko
yesterday 0885d16ac22a0ecd2267bf3c8818a3a8a5a9dadb
opendj-server-legacy/src/main/java/org/opends/server/protocols/http/HTTPConnectionHandler.java
@@ -12,6 +12,7 @@
 * information: "Portions Copyright [year] [name of copyright owner]".
 *
 * Copyright 2013-2016 ForgeRock AS.
 * Portions Copyright 2026 3A Systems, LLC.
 */
package org.opends.server.protocols.http;
@@ -165,6 +166,12 @@
   */
  private final Object waitListen = new Object();
  /**
   * The condition guarding {@link #waitListen}: set once the run method has tried to open the
   * socket port, whether it succeeded or not. Guarded by {@link #waitListen}.
   */
  private boolean listenAttempted;
  /** The friendly name of this connection handler. */
  private String friendlyName;
@@ -579,11 +586,15 @@
      try
      {
        waitListen.wait();
        while (!listenAttempted)
        {
          waitListen.wait();
        }
      }
      catch (InterruptedException e)
      {
        // If something interrupted the start its probably better to return ASAP
        Thread.currentThread().interrupt();
      }
    }
  }
@@ -625,7 +636,8 @@
          synchronized (waitListen)
          {
            starting = false;
            waitListen.notify();
            listenAttempted = true;
            waitListen.notifyAll();
          }
        }
@@ -646,7 +658,8 @@
        // to start but the start process should be notified and resume its work in any cases.
        synchronized (waitListen)
        {
          waitListen.notify();
          listenAttempted = true;
          waitListen.notifyAll();
        }
        // If we have gotten here, then we are about to start listening