Commits Carl Hasselskog patch for feeding PTCP stack's clock with valid time values.

This commit is contained in:
paweldomas 2013-11-21 18:51:46 +00:00
parent 24a6f9a95d
commit afd937ee54
2 changed files with 3 additions and 5 deletions

View File

@ -416,8 +416,6 @@ public class PseudoTCPBase
return; return;
} }
now = now & 0xFFFFFFFFL;
// Check if it's time to retransmit a segment // Check if it's time to retransmit a segment
if (m_rto_base > 0 && (timeDiff(m_rto_base + m_rx_rto, now) <= 0)) if (m_rto_base > 0 && (timeDiff(m_rto_base + m_rx_rto, now) <= 0))
{ {

View File

@ -459,7 +459,7 @@ class PseudoTcpSocketImpl
*/ */
private void startThreads() private void startThreads()
{ {
pseudoTcp.notifyClock(System.currentTimeMillis()); pseudoTcp.notifyClock(PseudoTCPBase.now());
receiveThread = new Thread(new Runnable() receiveThread = new Thread(new Runnable()
{ {
public void run() public void run()
@ -713,8 +713,8 @@ class PseudoTcpSocketImpl
{ {
synchronized (pseudoTcp) synchronized (pseudoTcp)
{ {
pseudoTcp.notifyClock(System.currentTimeMillis()); pseudoTcp.notifyClock(PseudoTCPBase.now());
sleep = pseudoTcp.getNextClock(System.currentTimeMillis()); sleep = pseudoTcp.getNextClock(PseudoTCPBase.now());
} }
//there might be negative interval even if there's no error //there might be negative interval even if there's no error