diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 2bbf785661..f927e6963b 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -1019,7 +1019,8 @@ namespace OpenSim.Framework
///
/// Thrown if we encounter a network issue while posting
/// the request. You'll want to make sure you deal with this as they're not uncommon
- public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs, IServiceAuth auth)
+ public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs = -1,
+ IServiceAuth auth = null, bool keepalive = true)
{
int reqnum = WebUtil.RequestNumber++;
@@ -1034,6 +1035,8 @@ namespace OpenSim.Framework
request.Method = verb;
if (timeoutsecs > 0)
request.Timeout = timeoutsecs * 1000;
+ if(!keepalive && request is HttpWebRequest)
+ ((HttpWebRequest)request).KeepAlive = false;
if (auth != null)
auth.AddAuthorization(request.Headers);
@@ -1125,16 +1128,6 @@ namespace OpenSim.Framework
return respstring;
}
- public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs)
- {
- return MakeRequest(verb, requestUrl, obj, timeoutsecs, null);
- }
-
- public static string MakeRequest(string verb, string requestUrl, string obj)
- {
- return MakeRequest(verb, requestUrl, obj, -1);
- }
-
public static string MakeRequest(string verb, string requestUrl, string obj, IServiceAuth auth)
{
return MakeRequest(verb, requestUrl, obj, -1, auth);
diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
index 45f4514814..74cd703a35 100644
--- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
+++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
@@ -158,7 +158,7 @@ namespace OpenSim.Services.Connectors.Friends
try
{
- string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString);
+ string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, 15, null, false);
if (reply != string.Empty)
{
Dictionary replyData = ServerUtils.ParseXmlResponse(reply);
diff --git a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
index 622d4e1712..8b31fa2d9d 100644
--- a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
@@ -277,7 +277,10 @@ namespace OpenSim.Services.Connectors.Hypergrid
{
reply = SynchronousRestFormsRequester.MakeRequest("POST",
uri,
- ServerUtils.BuildQueryString(sendData), 15);
+ ServerUtils.BuildQueryString(sendData),
+ 15,
+ null,
+ false);
}
catch (Exception e)
{