mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 05:45:37 +08:00
change share of almost empty class httpclient, to just share of used SocketsHttpHandler, This simpifies handling of timeout, otherwise problematic
This commit is contained in:
@@ -42,6 +42,7 @@ using OpenSim.Framework.Servers.HttpServer;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using Mono.Addins;
|
||||
using System.Net.Http;
|
||||
|
||||
/*****************************************************
|
||||
*
|
||||
@@ -686,9 +687,11 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||
ArrayList parameters = new ArrayList();
|
||||
parameters.Add(param);
|
||||
XmlRpcRequest req = new XmlRpcRequest(mName, parameters);
|
||||
HttpClient hclient = null;
|
||||
try
|
||||
{
|
||||
XmlRpcResponse resp = req.Send(DestURL, WebUtil.SharedHttpClientWithRedir, 30000);
|
||||
hclient = WebUtil.GetNewGlobalHttpClient(-1);
|
||||
XmlRpcResponse resp = req.Send(DestURL, hclient);
|
||||
if (resp != null)
|
||||
{
|
||||
Hashtable respParms;
|
||||
@@ -733,6 +736,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
||||
_finished = true;
|
||||
httpThread = null;
|
||||
Watchdog.RemoveThread();
|
||||
hclient?.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user