Removed an unnecessary lock in LLUDPClient.UpdateRTO() and LLUDPClient.BackoffRTO()
parent
3639f68411
commit
2222172afa
|
@ -144,9 +144,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
private readonly OutgoingPacket[] m_nextPackets = new OutgoingPacket[THROTTLE_CATEGORY_COUNT];
|
private readonly OutgoingPacket[] m_nextPackets = new OutgoingPacket[THROTTLE_CATEGORY_COUNT];
|
||||||
/// <summary>A reference to the LLUDPServer that is managing this client</summary>
|
/// <summary>A reference to the LLUDPServer that is managing this client</summary>
|
||||||
private readonly LLUDPServer m_udpServer;
|
private readonly LLUDPServer m_udpServer;
|
||||||
/// <summary>Locks access to the variables used while calculating round-trip
|
|
||||||
/// packet times and the retransmission timeout</summary>
|
|
||||||
private readonly object m_roundTripCalcLock = new object();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Default constructor
|
/// Default constructor
|
||||||
|
@ -487,8 +484,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
const float BETA = 0.25f;
|
const float BETA = 0.25f;
|
||||||
const float K = 4.0f;
|
const float K = 4.0f;
|
||||||
|
|
||||||
lock (m_roundTripCalcLock)
|
|
||||||
{
|
|
||||||
if (RTTVAR == 0.0f)
|
if (RTTVAR == 0.0f)
|
||||||
{
|
{
|
||||||
// First RTT measurement
|
// First RTT measurement
|
||||||
|
@ -508,7 +503,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
rto = Utils.Clamp(RTO, 3000, 60000);
|
rto = Utils.Clamp(RTO, 3000, 60000);
|
||||||
|
|
||||||
RTO = rto;
|
RTO = rto;
|
||||||
}
|
|
||||||
|
|
||||||
//m_log.Debug("[LLUDPCLIENT]: Setting agent " + this.Agent.FullName + "'s RTO to " + RTO + "ms with an RTTVAR of " +
|
//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");
|
// RTTVAR + " based on new RTT of " + r + "ms");
|
||||||
|
@ -519,8 +513,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
/// of RFC 2988
|
/// of RFC 2988
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void BackoffRTO()
|
public void BackoffRTO()
|
||||||
{
|
|
||||||
lock (m_roundTripCalcLock)
|
|
||||||
{
|
{
|
||||||
// Reset SRTT and RTTVAR, we assume they are bogus since things
|
// Reset SRTT and RTTVAR, we assume they are bogus since things
|
||||||
// didn't work out and we're backing off the timeout
|
// didn't work out and we're backing off the timeout
|
||||||
|
@ -530,7 +522,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Double the retransmission timeout
|
// Double the retransmission timeout
|
||||||
RTO = Math.Min(RTO * 2, 60000);
|
RTO = Math.Min(RTO * 2, 60000);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Does an early check to see if this queue empty callback is already
|
/// Does an early check to see if this queue empty callback is already
|
||||||
|
|
Loading…
Reference in New Issue