reduce absurd viewers blind retries of GroupProfileRequest

LSLKeyTest
UbitUmarov 2016-07-02 00:18:29 +01:00
parent 057bc648f3
commit 7991bb08f1
1 changed files with 55 additions and 38 deletions

View File

@ -11096,11 +11096,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
return true;
}
UUID lastGroupProfileRequestID = UUID.Zero;
double lastGroupProfileRequestTS = Util.GetTimeStampMS();
private bool HandleGroupProfileRequest(IClientAPI sender, Packet Pack)
{
if(m_GroupsModule == null)
return true;
GroupProfileRequestPacket groupProfileRequest =
(GroupProfileRequestPacket)Pack;
#region Packet Session and User Check
if (m_checkPackets)
{
@ -11110,8 +11118,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
#endregion
if (m_GroupsModule != null)
{
UUID grpID = groupProfileRequest.GroupData.GroupID;
double ts = Util.GetTimeStampMS();
if(grpID == lastGroupProfileRequestID && ts - lastGroupProfileRequestTS < 10000)
return true;
lastGroupProfileRequestID = grpID;
lastGroupProfileRequestTS = ts;
GroupProfileReplyPacket groupProfileReply = (GroupProfileReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupProfileReply);
groupProfileReply.AgentData = new GroupProfileReplyPacket.AgentDataBlock();
@ -11153,7 +11167,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
OutPacket(groupProfileReply, ThrottleOutPacketType.Task);
}
if(grpID == lastGroupProfileRequestID)
lastGroupProfileRequestTS = Util.GetTimeStampMS() - 7000;
return true;
}
private bool HandleGroupMembersRequest(IClientAPI sender, Packet Pack)