remove from use the UpdatesResend on resending udp packets. Just resend
the UDP packet. Also just loose packets we tried to send 6 times already (ll says 3) A viewer may just beeing ignoring them, or then the link is just dead.avinationmerge
parent
16cf3967b4
commit
542118adf1
|
@ -3838,47 +3838,53 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
|
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/* dont use this
|
||||||
/// Requeue an EntityUpdate when it was not acknowledged by the client.
|
udp packet resent must be done at udp level only
|
||||||
/// We will update the priority and put it in the correct queue, merging update flags
|
re map from a packet to original updates just doesnt work
|
||||||
/// with any other updates that may be queued for the same entity.
|
|
||||||
/// The original update time is used for the merged update.
|
|
||||||
/// </summary>
|
|
||||||
private void ResendPrimUpdate(EntityUpdate update)
|
|
||||||
{
|
|
||||||
// If the update exists in priority queue, it will be updated.
|
|
||||||
// If it does not exist then it will be added with the current (rather than its original) priority
|
|
||||||
uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
|
|
||||||
|
|
||||||
lock (m_entityUpdates.SyncRoot)
|
/// <summary>
|
||||||
m_entityUpdates.Enqueue(priority, update);
|
/// Requeue an EntityUpdate when it was not acknowledged by the client.
|
||||||
}
|
/// We will update the priority and put it in the correct queue, merging update flags
|
||||||
|
/// with any other updates that may be queued for the same entity.
|
||||||
|
/// The original update time is used for the merged update.
|
||||||
|
/// </summary>
|
||||||
|
private void ResendPrimUpdate(EntityUpdate update)
|
||||||
|
{
|
||||||
|
// If the update exists in priority queue, it will be updated.
|
||||||
|
// If it does not exist then it will be added with the current (rather than its original) priority
|
||||||
|
uint priority = m_prioritizer.GetUpdatePriority(this, update.Entity);
|
||||||
|
|
||||||
/// <summary>
|
lock (m_entityUpdates.SyncRoot)
|
||||||
/// Requeue a list of EntityUpdates when they were not acknowledged by the client.
|
m_entityUpdates.Enqueue(priority, update);
|
||||||
/// We will update the priority and put it in the correct queue, merging update flags
|
}
|
||||||
/// with any other updates that may be queued for the same entity.
|
|
||||||
/// The original update time is used for the merged update.
|
|
||||||
/// </summary>
|
|
||||||
private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
|
|
||||||
{
|
|
||||||
// m_log.WarnFormat("[CLIENT] resending prim updates {0}, packet sequence number {1}", updates[0].UpdateTime, oPacket.SequenceNumber);
|
|
||||||
|
|
||||||
// Remove the update packet from the list of packets waiting for acknowledgement
|
|
||||||
// because we are requeuing the list of updates. They will be resent in new packets
|
|
||||||
// with the most recent state and priority.
|
|
||||||
m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
|
|
||||||
|
|
||||||
// Count this as a resent packet since we are going to requeue all of the updates contained in it
|
/// <summary>
|
||||||
Interlocked.Increment(ref m_udpClient.PacketsResent);
|
/// Requeue a list of EntityUpdates when they were not acknowledged by the client.
|
||||||
|
/// We will update the priority and put it in the correct queue, merging update flags
|
||||||
|
/// with any other updates that may be queued for the same entity.
|
||||||
|
/// The original update time is used for the merged update.
|
||||||
|
/// </summary>
|
||||||
|
private void ResendPrimUpdates(List<EntityUpdate> updates, OutgoingPacket oPacket)
|
||||||
|
{
|
||||||
|
// m_log.WarnFormat("[CLIENT] resending prim updates {0}, packet sequence number {1}", updates[0].UpdateTime, oPacket.SequenceNumber);
|
||||||
|
|
||||||
// We're not going to worry about interlock yet since its not currently critical that this total count
|
// Remove the update packet from the list of packets waiting for acknowledgement
|
||||||
// is 100% correct
|
// because we are requeuing the list of updates. They will be resent in new packets
|
||||||
m_udpServer.PacketsResentCount++;
|
// with the most recent state and priority.
|
||||||
|
m_udpClient.NeedAcks.Remove(oPacket.SequenceNumber);
|
||||||
|
|
||||||
foreach (EntityUpdate update in updates)
|
// Count this as a resent packet since we are going to requeue all of the updates contained in it
|
||||||
ResendPrimUpdate(update);
|
Interlocked.Increment(ref m_udpClient.PacketsResent);
|
||||||
}
|
|
||||||
|
// We're not going to worry about interlock yet since its not currently critical that this total count
|
||||||
|
// is 100% correct
|
||||||
|
m_udpServer.PacketsResentCount++;
|
||||||
|
|
||||||
|
foreach (EntityUpdate update in updates)
|
||||||
|
ResendPrimUpdate(update);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
|
// OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>> objectUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdatePacket.ObjectDataBlock>>();
|
||||||
// OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
|
// OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>> compressedUpdateBlocks = new OpenSim.Framework.Lazy<List<ObjectUpdateCompressedPacket.ObjectDataBlock>>();
|
||||||
|
@ -4197,7 +4203,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
for (int i = 0; i < blocks.Count; i++)
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
packet.ObjectData[i] = blocks[i];
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); });
|
// OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); });
|
||||||
|
// use default udp retry
|
||||||
|
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Packet Sending
|
#endregion Packet Sending
|
||||||
|
|
|
@ -1207,6 +1207,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
//m_log.DebugFormat("[LLUDPSERVER]: Resending packet #{0} (attempt {1}), {2}ms have passed",
|
//m_log.DebugFormat("[LLUDPSERVER]: Resending packet #{0} (attempt {1}), {2}ms have passed",
|
||||||
// outgoingPacket.SequenceNumber, outgoingPacket.ResendCount, Environment.TickCount - outgoingPacket.TickCount);
|
// outgoingPacket.SequenceNumber, outgoingPacket.ResendCount, Environment.TickCount - outgoingPacket.TickCount);
|
||||||
|
|
||||||
|
// Bump up the resend count on this packet
|
||||||
|
Interlocked.Increment(ref outgoingPacket.ResendCount);
|
||||||
|
|
||||||
|
// loose packets we retried more than 6 times
|
||||||
|
// sl says 3 so lets be more tolerant
|
||||||
|
// we can't not keep hammering with packets a viewer may just beeing ignoring
|
||||||
|
|
||||||
|
if (outgoingPacket.ResendCount > 6)
|
||||||
|
return;
|
||||||
|
|
||||||
// Set the resent flag
|
// Set the resent flag
|
||||||
outgoingPacket.Buffer.Data[0] = (byte)(outgoingPacket.Buffer.Data[0] | Helpers.MSG_RESENT);
|
outgoingPacket.Buffer.Data[0] = (byte)(outgoingPacket.Buffer.Data[0] | Helpers.MSG_RESENT);
|
||||||
outgoingPacket.Category = ThrottleOutPacketType.Resend;
|
outgoingPacket.Category = ThrottleOutPacketType.Resend;
|
||||||
|
|
Loading…
Reference in New Issue