mirror of
https://github.com/opensim/opensim.git
synced 2026-06-29 02:25:39 +08:00
refactor: Simplify ScriptsHttpRequests.GetNextCompletedRequest to more simply iterate through pending requests without unnecessary checks.
This commit is contained in:
@@ -293,19 +293,13 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest
|
||||
{
|
||||
lock (HttpListLock)
|
||||
{
|
||||
foreach (UUID luid in m_pendingRequests.Keys)
|
||||
foreach (HttpRequestClass req in m_pendingRequests.Values)
|
||||
{
|
||||
HttpRequestClass tmpReq;
|
||||
|
||||
if (m_pendingRequests.TryGetValue(luid, out tmpReq))
|
||||
{
|
||||
if (tmpReq.Finished)
|
||||
{
|
||||
return tmpReq;
|
||||
}
|
||||
}
|
||||
if (req.Finished)
|
||||
return req;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user