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.
This commit is contained in:
Justin Clark-Casey (justincc)
2013-04-04 00:36:15 +01:00
parent 94d44142e3
commit 831e4c3850
3 changed files with 77 additions and 33 deletions

View File

@@ -45,7 +45,13 @@ namespace OpenSim.Region.Framework.Interfaces
{
UUID MakeHttpRequest(string url, string parameters, string body);
UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body);
void StopHttpRequest(uint m_localID, UUID m_itemID);
/// <summary>
/// Stop and remove all http requests for the given script.
/// </summary>
/// <param name='id'></param>
void StopHttpRequestsForScript(UUID id);
IServiceRequest GetNextCompletedRequest();
void RemoveCompletedRequest(UUID id);
}