diff options
author | Justin Clark-Casey (justincc) | 2013-04-04 00:36:15 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-04-04 00:36:15 +0100 |
commit | 831e4c38506140e9ece2db4b96b4f0960a0276a8 (patch) | |
tree | 8a341213d3da08c85a07c62145db0fcecaedad07 /OpenSim/Region/Framework | |
parent | minor: Stop falsely logging that a teleport was being aborted on client logou... (diff) | |
download | opensim-SC_OLD-831e4c38506140e9ece2db4b96b4f0960a0276a8.zip opensim-SC_OLD-831e4c38506140e9ece2db4b96b4f0960a0276a8.tar.gz opensim-SC_OLD-831e4c38506140e9ece2db4b96b4f0960a0276a8.tar.bz2 opensim-SC_OLD-831e4c38506140e9ece2db4b96b4f0960a0276a8.tar.xz |
Fix bug where outstanding llHTTPRequests for scripts were not being aborted when they were deleted.
This was because AsyncCommandManager was handing an item ID to IHttpRequestModule.StopHttpRequest() rather than the expected request ID.
This commit also makes the http request asynchronous using BeginGetResponse() rather than doing this by launching a new thread
so that we can more safely abort it via HttpWebRequest.Abort() rather than aborting the thread itself.
This also renames StopHttpRequest() to StopHttpRequestsForScript() since any outstanding requests are now aborted and/or removed.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IHttpRequests.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs index eb6c5ac..113dcd7 100644 --- a/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs +++ b/OpenSim/Region/Framework/Interfaces/IHttpRequests.cs | |||
@@ -45,7 +45,13 @@ namespace OpenSim.Region.Framework.Interfaces | |||
45 | { | 45 | { |
46 | UUID MakeHttpRequest(string url, string parameters, string body); | 46 | UUID MakeHttpRequest(string url, string parameters, string body); |
47 | UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body); | 47 | UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body); |
48 | void StopHttpRequest(uint m_localID, UUID m_itemID); | 48 | |
49 | /// <summary> | ||
50 | /// Stop and remove all http requests for the given script. | ||
51 | /// </summary> | ||
52 | /// <param name='id'></param> | ||
53 | void StopHttpRequestsForScript(UUID id); | ||
54 | |||
49 | IServiceRequest GetNextCompletedRequest(); | 55 | IServiceRequest GetNextCompletedRequest(); |
50 | void RemoveCompletedRequest(UUID id); | 56 | void RemoveCompletedRequest(UUID id); |
51 | } | 57 | } |