Removing the Sleep(0) call from the OutgoingPacketHandler
parent
7ee422a344
commit
bb4da417ad
|
@ -790,12 +790,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// client. m_packetSent will be set to true if a packet is sent
|
// client. m_packetSent will be set to true if a packet is sent
|
||||||
m_scene.ClientManager.ForEachSync(ClientOutgoingPacketHandler);
|
m_scene.ClientManager.ForEachSync(ClientOutgoingPacketHandler);
|
||||||
|
|
||||||
// If a packet was sent, only do a minimum length context switch to allow
|
// If nothing was sent, sleep for the minimum amount of time before a
|
||||||
// other parts of the code to do work. If nothing was sent, sleep for the
|
// token bucket could get more tokens
|
||||||
// minimum amount of time before a token bucket could get more tokens
|
if (!m_packetSent)
|
||||||
if (m_packetSent)
|
|
||||||
Thread.Sleep(0);
|
|
||||||
else
|
|
||||||
Thread.Sleep((int)TickCountResolution);
|
Thread.Sleep((int)TickCountResolution);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
Loading…
Reference in New Issue