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;
}
now = now & 0xFFFFFFFFL;
// Check if it's time to retransmit a segment
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()
{
pseudoTcp.notifyClock(System.currentTimeMillis());
pseudoTcp.notifyClock(PseudoTCPBase.now());
receiveThread = new Thread(new Runnable()
{
public void run()
@ -713,8 +713,8 @@ class PseudoTcpSocketImpl
{
synchronized (pseudoTcp)
{
pseudoTcp.notifyClock(System.currentTimeMillis());
sleep = pseudoTcp.getNextClock(System.currentTimeMillis());
pseudoTcp.notifyClock(PseudoTCPBase.now());
sleep = pseudoTcp.getNextClock(PseudoTCPBase.now());
}
//there might be negative interval even if there's no error