added a lock to prevent multiple Timer popping races

on the packet queues.
afrisby
Sean Dague 2007-12-06 21:59:31 +00:00
parent 1ad83bcf1b
commit 9326ee425b
1 changed files with 67 additions and 67 deletions

View File

@ -225,6 +225,7 @@ namespace OpenSim.Region.ClientStack
// We're going to dequeue all of the saved up packets until // We're going to dequeue all of the saved up packets until
// we've hit the throttle limit or there's no more packets to send // we've hit the throttle limit or there's no more packets to send
lock (throttleTimer) {
while ((bytesSent <= ((int)(throttleOutbound/throttleTimeDivisor)) && while ((bytesSent <= ((int)(throttleOutbound/throttleTimeDivisor)) &&
(ResendOutgoingPacketQueue.Count > 0 || (ResendOutgoingPacketQueue.Count > 0 ||
LandOutgoingPacketQueue.Count > 0 || LandOutgoingPacketQueue.Count > 0 ||
@ -292,9 +293,8 @@ namespace OpenSim.Region.ClientStack
bytesSent += qpack.Packet.ToBytes().Length; bytesSent += qpack.Packet.ToBytes().Length;
AssetBytesSent += qpack.Packet.ToBytes().Length; AssetBytesSent += qpack.Packet.ToBytes().Length;
} }
} }
}
} }
public LLUUID SessionId public LLUUID SessionId