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

Matthew Swift
06.20.2013 b6722e6c66f73704ee8bfb6eadc3dbefd04b4c74
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
opends/src/server/org/opends/server/replication/server/ReplicationServer.java 13 ●●●●● patch | view | raw | blame | history
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);
      }
    }
  }