* Reduce the annoyingness of clients that continually request unfound textures (probably for some good reason) by dropping all subsequent requests after the first reply.
* Print out a console message every 20 tries rather than every single one. * This weakens the problem but does not eliminate it0.6.0-stable
parent
7d1dcf3e68
commit
cd1978b424
|
@ -60,6 +60,13 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private readonly BlockingQueue<ITextureSender> m_sharedSendersQueue;
|
private readonly BlockingQueue<ITextureSender> m_sharedSendersQueue;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// We're going to record when we get a request for a particular missing texture for each client
|
||||||
|
/// XXX This is really a temporary solution to deal with the situation where a client continually requests
|
||||||
|
/// the same missing textures
|
||||||
|
/// </summary>
|
||||||
|
private readonly Dictionary<LLUUID, int> missingTextureRequests = new Dictionary<LLUUID, int>();
|
||||||
|
|
||||||
private readonly Scene m_scene;
|
private readonly Scene m_scene;
|
||||||
|
|
||||||
private readonly IClientAPI m_client;
|
private readonly IClientAPI m_client;
|
||||||
|
@ -138,12 +145,33 @@ namespace OpenSim.Region.Environment.Modules
|
||||||
// Needs investigation.
|
// Needs investigation.
|
||||||
if (texture == null || texture.Data == null)
|
if (texture == null || texture.Data == null)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat(
|
// We're only going to tell the client once about a missing texture, even if it keeps asking
|
||||||
"[USER TEXTURE DOWNLOAD SERVICE]: Queueing TextureNotFoundSender for {0}, client {1}",
|
// XXX This is to reduce (but not resolve) a current problem where some clients keep requesting the same textures
|
||||||
textureID, m_client.AgentId);
|
// - one might want to do this for all asset requests (or allow a number of retries) in the
|
||||||
|
// longer term.
|
||||||
ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID);
|
if (!missingTextureRequests.ContainsKey(textureID))
|
||||||
EnqueueTextureSender(textureNotFoundSender);
|
{
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[USER TEXTURE DOWNLOAD SERVICE]: Queueing TextureNotFoundSender for {0}, client {1}",
|
||||||
|
textureID, m_client.AgentId);
|
||||||
|
|
||||||
|
ITextureSender textureNotFoundSender = new TextureNotFoundSender(m_client, textureID);
|
||||||
|
EnqueueTextureSender(textureNotFoundSender);
|
||||||
|
missingTextureRequests.Add(textureID, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int requests = missingTextureRequests[textureID] + 1;
|
||||||
|
|
||||||
|
if (requests % 20 == 0)
|
||||||
|
{
|
||||||
|
m_log.WarnFormat(
|
||||||
|
"[USER TEXTURE DOWNLOAD SERVICE]: Received {0} requests for the missing texture {1} from client {2}",
|
||||||
|
requests, textureID, m_client.AgentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
missingTextureRequests[textureID] = requests;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue