mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user