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

Matthew Swift
06.20.2013 dd0998a9a44a2920a20f5ebe84163c6de44e12f4
Fix OPENDJ-1127: Replication server reconnect thread consumes too much CPU

* fix JDK6 build - InetAddress.getLoopbackAddress() is JDK7 only.
1 files modified
13 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java 13 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/replication/server/ReplicationServer.java
@@ -1856,6 +1856,8 @@
    }
  }
  private InetAddress getLocalAddress()
  {
    try
@@ -1864,7 +1866,16 @@
    }
    catch (UnknownHostException e)
    {
      return InetAddress.getLoopbackAddress();
      try
      {
        return InetAddress.getByAddress("localhost", new byte[] { 0x7f, 0x00,
            0x00, 0x01 });
      }
      catch (UnknownHostException never)
      {
        // Illegal address length.
        throw new RuntimeException(never);
      }
    }
  }