From 00093a305d225c98ffe00b656df7943cb50c42b0 Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 29 Jun 2013 18:35:23 -0700
Subject: Changed HG status notifications timeout down to 15secs from the
default 100.
---
OpenSim/Framework/WebUtil.cs | 10 +++++++++-
.../Connectors/Hypergrid/HGFriendsServicesConnector.cs | 2 +-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs
index 4599f62..6fb1e0c 100644
--- a/OpenSim/Framework/WebUtil.cs
+++ b/OpenSim/Framework/WebUtil.cs
@@ -962,11 +962,12 @@ 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)
+ public static string MakeRequest(string verb, string requestUrl, string obj, int timeoutsecs)
{
int reqnum = WebUtil.RequestNumber++;
@@ -980,6 +981,8 @@ namespace OpenSim.Framework
WebRequest request = WebRequest.Create(requestUrl);
request.Method = verb;
+ if (timeoutsecs > 0)
+ request.Timeout = timeoutsecs * 1000;
string respstring = String.Empty;
using (MemoryStream buffer = new MemoryStream())
@@ -1073,6 +1076,11 @@ namespace OpenSim.Framework
return respstring;
}
+
+ public static string MakeRequest(string verb, string requestUrl, string obj)
+ {
+ return MakeRequest(verb, requestUrl, obj, -1);
+ }
}
public class SynchronousRestObjectRequester
diff --git a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
index e984a54..622d4e1 100644
--- a/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Hypergrid/HGFriendsServicesConnector.cs
@@ -277,7 +277,7 @@ namespace OpenSim.Services.Connectors.Hypergrid
{
reply = SynchronousRestFormsRequester.MakeRequest("POST",
uri,
- ServerUtils.BuildQueryString(sendData));
+ ServerUtils.BuildQueryString(sendData), 15);
}
catch (Exception e)
{
--
cgit v1.1