* Handle UseCircuitCode packets asynchronously. Adding an agent to a scene can take several seconds, and was blocking up packet handling in the meantime

* Clamp retransmission timeout values between three and 10 seconds
* Log outgoing time for a packet right after it is sent instead of well before
* Loop through the entire UnackedPacketCollection when looking for expired packets
This commit is contained in:
John Hurliman
2009-10-21 13:47:16 -07:00
parent 9178537e94
commit 7ee422a344
3 changed files with 49 additions and 13 deletions

View File

@@ -505,8 +505,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
SRTT = (1.0f - ALPHA) * SRTT + ALPHA * r;
}
// Always round retransmission timeout up to two seconds
RTO = Math.Max(2000, (int)(SRTT + Math.Max(m_udpServer.TickCountResolution, K * RTTVAR)));
RTO = (int)(SRTT + Math.Max(m_udpServer.TickCountResolution, K * RTTVAR));
// Clamp the retransmission timeout to manageable values
RTO = Utils.Clamp(RTO, 3000, 10000);
//m_log.Debug("[LLUDPCLIENT]: Setting agent " + this.Agent.FullName + "'s RTO to " + RTO + "ms with an RTTVAR of " +
// RTTVAR + " based on new RTT of " + r + "ms");
}