mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 01:35:46 +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:
@@ -55,6 +55,7 @@ using OpenMetaverse;
|
||||
using OpenMetaverse.StructuredData;
|
||||
using Amib.Threading;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace OpenSim.Framework
|
||||
{
|
||||
@@ -2194,6 +2195,7 @@ namespace OpenSim.Framework
|
||||
return ms;
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static XmlRpcResponse XmlRpcCommand(string url, string methodName, params object[] args)
|
||||
{
|
||||
return SendXmlRpcCommand(url, methodName, args);
|
||||
@@ -2201,8 +2203,9 @@ namespace OpenSim.Framework
|
||||
|
||||
public static XmlRpcResponse SendXmlRpcCommand(string url, string methodName, object[] args)
|
||||
{
|
||||
XmlRpcRequest client = new(methodName, args);
|
||||
return client.Send(url, WebUtil.SharedHttpClientWithRedir, 6000);
|
||||
XmlRpcRequest xmlclient = new(methodName, args);
|
||||
using HttpClient hclient = WebUtil.GetNewGlobalHttpClient(10000);
|
||||
return xmlclient.Send(url, hclient);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user