diff options
author | Justin Clark-Casey (justincc) | 2013-04-04 00:49:07 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-04-04 00:49:07 +0100 |
commit | f281a994e8544d95961ef669a0fe14c0cba7f175 (patch) | |
tree | 1624d1e9b6fcaa45875a85ed35075ea30ce2bc50 /OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |
parent | Fix bug where outstanding llHTTPRequests for scripts were not being aborted w... (diff) | |
download | opensim-SC-f281a994e8544d95961ef669a0fe14c0cba7f175.zip opensim-SC-f281a994e8544d95961ef669a0fe14c0cba7f175.tar.gz opensim-SC-f281a994e8544d95961ef669a0fe14c0cba7f175.tar.bz2 opensim-SC-f281a994e8544d95961ef669a0fe14c0cba7f175.tar.xz |
refactor: Simplify ScriptsHttpRequests.GetNextCompletedRequest to more simply iterate through pending requests without unnecessary checks.
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs index 1c251b8..ebf56cd 100644 --- a/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs +++ b/OpenSim/Region/CoreModules/Scripting/HttpRequest/ScriptsHttpRequests.cs | |||
@@ -293,19 +293,13 @@ namespace OpenSim.Region.CoreModules.Scripting.HttpRequest | |||
293 | { | 293 | { |
294 | lock (HttpListLock) | 294 | lock (HttpListLock) |
295 | { | 295 | { |
296 | foreach (UUID luid in m_pendingRequests.Keys) | 296 | foreach (HttpRequestClass req in m_pendingRequests.Values) |
297 | { | 297 | { |
298 | HttpRequestClass tmpReq; | 298 | if (req.Finished) |
299 | 299 | return req; | |
300 | if (m_pendingRequests.TryGetValue(luid, out tmpReq)) | ||
301 | { | ||
302 | if (tmpReq.Finished) | ||
303 | { | ||
304 | return tmpReq; | ||
305 | } | ||
306 | } | ||
307 | } | 300 | } |
308 | } | 301 | } |
302 | |||
309 | return null; | 303 | return null; |
310 | } | 304 | } |
311 | 305 | ||