diff options
author | Tedd Hansen | 2008-04-18 15:25:43 +0000 |
---|---|---|
committer | Tedd Hansen | 2008-04-18 15:25:43 +0000 |
commit | acb0b06fedf8729e98e87f8d2da968f546e5e31f (patch) | |
tree | f6fca861372417ffeb9dab1c1de57a454e8ce9ad /OpenSim/Region | |
parent | * Fixed two compiler warnings dealing with IPAddress equality. (diff) | |
download | opensim-SC-acb0b06fedf8729e98e87f8d2da968f546e5e31f.zip opensim-SC-acb0b06fedf8729e98e87f8d2da968f546e5e31f.tar.gz opensim-SC-acb0b06fedf8729e98e87f8d2da968f546e5e31f.tar.bz2 opensim-SC-acb0b06fedf8729e98e87f8d2da968f546e5e31f.tar.xz |
Mantis #851, 100% CPU on unhandlet HTTP event. Thanks cmickeyb.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs index 1097ca0..d62734f 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/HttpRequest.cs | |||
@@ -72,18 +72,30 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin | |||
72 | // implemented here yet anyway. Should be fixed if/when maxsize | 72 | // implemented here yet anyway. Should be fixed if/when maxsize |
73 | // is supported | 73 | // is supported |
74 | 74 | ||
75 | if (m_CmdManager.m_ScriptEngine.m_ScriptManager.GetScript(httpInfo.localID, httpInfo.itemID) != null) | 75 | bool handled = false; |
76 | iHttpReq.RemoveCompletedRequest(httpInfo.reqID); | ||
77 | foreach (ScriptEngine sman in ScriptEngine.ScriptEngines) | ||
76 | { | 78 | { |
77 | iHttpReq.RemoveCompletedRequest(httpInfo.reqID); | 79 | if (sman.m_ScriptManager.GetScript(httpInfo.localID, httpInfo.itemID) != null) |
78 | object[] resobj = new object[] | ||
79 | { | 80 | { |
80 | httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body | 81 | object[] resobj = new object[] |
81 | }; | 82 | { |
83 | httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body | ||
84 | }; | ||
82 | 85 | ||
83 | m_CmdManager.m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( | 86 | sman.m_EventQueueManager.AddToScriptQueue( |
84 | httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj | 87 | httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj |
85 | ); | 88 | ); |
86 | //Thread.Sleep(2500); | 89 | |
90 | handled = true; | ||
91 | break; | ||
92 | //Thread.Sleep(2500); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | if (!handled) | ||
97 | { | ||
98 | Console.WriteLine("Unhandled http_response: " + httpInfo.reqID); | ||
87 | } | 99 | } |
88 | 100 | ||
89 | httpInfo = iHttpReq.GetNextCompletedRequest(); | 101 | httpInfo = iHttpReq.GetNextCompletedRequest(); |