diff options
author | Diva Canto | 2011-05-02 09:04:34 -0700 |
---|---|---|
committer | Diva Canto | 2011-05-02 09:04:34 -0700 |
commit | 8cc547c2776f957abd0fa09c33c02bf42de70340 (patch) | |
tree | 446acf38bcb48d7b4c232b044a957e0ffed36425 /OpenSim/Framework | |
parent | Fixed confusing OSDMap that comes as the response of QueryAccess in the case ... (diff) | |
download | opensim-SC_OLD-8cc547c2776f957abd0fa09c33c02bf42de70340.zip opensim-SC_OLD-8cc547c2776f957abd0fa09c33c02bf42de70340.tar.gz opensim-SC_OLD-8cc547c2776f957abd0fa09c33c02bf42de70340.tar.bz2 opensim-SC_OLD-8cc547c2776f957abd0fa09c33c02bf42de70340.tar.xz |
Turns out that it's a bad idea to let Agent position updates linger for a long time on certain versions of mono. It's better to abort them if they take too long. So timeout is now an argument. Currently: 20secs for CreateAgent, 100secs for UpdateAgent (fat), 10 secs for UpdateAgent (Position); all of these divided by 4, for ReadWrite, as Mic had before.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index ac0828b..4734fc1 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -140,19 +140,19 @@ namespace OpenSim.Framework | |||
140 | /// PUT JSON-encoded data to a web service that returns LLSD or | 140 | /// PUT JSON-encoded data to a web service that returns LLSD or |
141 | /// JSON data | 141 | /// JSON data |
142 | /// </summary> | 142 | /// </summary> |
143 | public static OSDMap PutToService(string url, OSDMap data) | 143 | public static OSDMap PutToService(string url, OSDMap data, int timeout) |
144 | { | 144 | { |
145 | return ServiceOSDRequest(url,data,"PUT",30000); | 145 | return ServiceOSDRequest(url,data, "PUT", timeout); |
146 | } | 146 | } |
147 | 147 | ||
148 | public static OSDMap PostToService(string url, OSDMap data) | 148 | public static OSDMap PostToService(string url, OSDMap data, int timeout) |
149 | { | 149 | { |
150 | return ServiceOSDRequest(url,data,"POST",30000); | 150 | return ServiceOSDRequest(url, data, "POST", timeout); |
151 | } | 151 | } |
152 | 152 | ||
153 | public static OSDMap GetFromService(string url) | 153 | public static OSDMap GetFromService(string url, int timeout) |
154 | { | 154 | { |
155 | return ServiceOSDRequest(url,null,"GET",30000); | 155 | return ServiceOSDRequest(url, null, "GET", timeout); |
156 | } | 156 | } |
157 | 157 | ||
158 | public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout) | 158 | public static OSDMap ServiceOSDRequest(string url, OSDMap data, string method, int timeout) |
@@ -171,7 +171,7 @@ namespace OpenSim.Framework | |||
171 | request.Timeout = timeout; | 171 | request.Timeout = timeout; |
172 | request.KeepAlive = false; | 172 | request.KeepAlive = false; |
173 | request.MaximumAutomaticRedirections = 10; | 173 | request.MaximumAutomaticRedirections = 10; |
174 | request.ReadWriteTimeout = timeout * 8; | 174 | request.ReadWriteTimeout = timeout / 4; |
175 | request.Headers[OSHeaderRequestID] = reqnum.ToString(); | 175 | request.Headers[OSHeaderRequestID] = reqnum.ToString(); |
176 | 176 | ||
177 | // If there is some input, write it into the request | 177 | // If there is some input, write it into the request |