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
UbitUmarov 2014-08-20 18:55:06 +01:00
parent 16cf3967b4
commit 542118adf1
2 changed files with 54 additions and 36 deletions

View File

@ -3838,6 +3838,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_entityUpdates.Enqueue(priority, new EntityUpdate(entity, updateFlags, m_scene.TimeDilation));
}
/* dont use this
udp packet resent must be done at udp level only
re map from a packet to original updates just doesnt work
/// <summary>
/// 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
@ -3854,6 +3858,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_entityUpdates.Enqueue(priority, update);
}
/// <summary>
/// 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
@ -3879,6 +3884,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
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<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++)
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

View File

@ -1207,6 +1207,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
//m_log.DebugFormat("[LLUDPSERVER]: Resending packet #{0} (attempt {1}), {2}ms have passed",
// 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
outgoingPacket.Buffer.Data[0] = (byte)(outgoingPacket.Buffer.Data[0] | Helpers.MSG_RESENT);
outgoingPacket.Category = ThrottleOutPacketType.Resend;