Mantis #851, 100% CPU on unhandlet HTTP event. Thanks cmickeyb.
parent
a2b32bdd6f
commit
acb0b06fed
|
@ -72,19 +72,31 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
|
||||||
// implemented here yet anyway. Should be fixed if/when maxsize
|
// implemented here yet anyway. Should be fixed if/when maxsize
|
||||||
// is supported
|
// is supported
|
||||||
|
|
||||||
if (m_CmdManager.m_ScriptEngine.m_ScriptManager.GetScript(httpInfo.localID, httpInfo.itemID) != null)
|
bool handled = false;
|
||||||
{
|
|
||||||
iHttpReq.RemoveCompletedRequest(httpInfo.reqID);
|
iHttpReq.RemoveCompletedRequest(httpInfo.reqID);
|
||||||
|
foreach (ScriptEngine sman in ScriptEngine.ScriptEngines)
|
||||||
|
{
|
||||||
|
if (sman.m_ScriptManager.GetScript(httpInfo.localID, httpInfo.itemID) != null)
|
||||||
|
{
|
||||||
object[] resobj = new object[]
|
object[] resobj = new object[]
|
||||||
{
|
{
|
||||||
httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body
|
httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body
|
||||||
};
|
};
|
||||||
|
|
||||||
m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
|
sman.m_EventQueueManager.AddToScriptQueue(
|
||||||
httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj
|
httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj
|
||||||
);
|
);
|
||||||
|
|
||||||
|
handled = true;
|
||||||
|
break;
|
||||||
//Thread.Sleep(2500);
|
//Thread.Sleep(2500);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!handled)
|
||||||
|
{
|
||||||
|
Console.WriteLine("Unhandled http_response: " + httpInfo.reqID);
|
||||||
|
}
|
||||||
|
|
||||||
httpInfo = iHttpReq.GetNextCompletedRequest();
|
httpInfo = iHttpReq.GetNextCompletedRequest();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue