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

neil_a_wilson
29.12.2007 42b383614d9a4720f6f0c91fb770a389cfa41738
opends/src/server/org/opends/server/synchronization/protocol/SocketSession.java
@@ -112,16 +112,11 @@
    /* Read the first 8 bytes containing the packet length */
    int length = 0;
    /* Let's start the stop-watch before waiting on read */
    /* for the heartbeat check to be operationnal        */
    lastReceiveTime = System.currentTimeMillis();
    while (length<8)
    {
      int read = input.read(rcvLengthBuf, length, 8-length);
      if (read == -1)
      {
        lastReceiveTime=0;
        throw new IOException("no more data");
      }
      else
@@ -140,9 +135,8 @@
      {
        length += input.read(buffer, length, totalLength - length);
      }
      /* We do not want the heartbeat to close the session when */
      /* we are processing a message even a time consuming one. */
      lastReceiveTime=0;
      lastReceiveTime = System.currentTimeMillis();
      return SynchronizationMessage.generateMsg(buffer);
    }
    catch (OutOfMemoryError e)
@@ -165,10 +159,6 @@
   */
  public long getLastReceiveTime()
  {
    if (lastReceiveTime==0)
    {
      return System.currentTimeMillis();
    }
    return lastReceiveTime;
  }