diff options
author | Justin Clarke Casey | 2009-06-05 13:48:43 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2009-06-05 13:48:43 +0000 |
commit | bfea07750835ab7b14f56e94bff869505a88ebb4 (patch) | |
tree | da8dd21507a1e322d100ec05dd1803df9c6da0d3 /OpenSim/Framework | |
parent | Thank you, thomax, for a patch to provide finer-grained access control to (diff) | |
download | opensim-SC_OLD-bfea07750835ab7b14f56e94bff869505a88ebb4.zip opensim-SC_OLD-bfea07750835ab7b14f56e94bff869505a88ebb4.tar.gz opensim-SC_OLD-bfea07750835ab7b14f56e94bff869505a88ebb4.tar.bz2 opensim-SC_OLD-bfea07750835ab7b14f56e94bff869505a88ebb4.tar.xz |
* Add oar saving timeout
* If an oar save fails to get responses to all asset requests to the asset service then timeout after 60 seconds
* Timeout executes abort, since missing assets in an OAR seems bad
* This means that oar saves won't permanently hang and instead can be retried if something goes wrong with the asset service
* This is not a solution to mantis 3714. Hopefully a fix will be along shortly since I can now consistently reproduce that problem
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Servers/BaseGetAssetStreamHandler.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/OpenSim/Framework/Servers/BaseGetAssetStreamHandler.cs b/OpenSim/Framework/Servers/BaseGetAssetStreamHandler.cs index 9eacf24..83a5676 100644 --- a/OpenSim/Framework/Servers/BaseGetAssetStreamHandler.cs +++ b/OpenSim/Framework/Servers/BaseGetAssetStreamHandler.cs | |||
@@ -61,7 +61,7 @@ namespace OpenSim.Framework.Servers | |||
61 | if (p.Length > 0) | 61 | if (p.Length > 0) |
62 | { | 62 | { |
63 | UUID assetID; | 63 | UUID assetID; |
64 | 64 | ||
65 | if (!UUID.TryParse(p[0], out assetID)) | 65 | if (!UUID.TryParse(p[0], out assetID)) |
66 | { | 66 | { |
67 | m_log.InfoFormat( | 67 | m_log.InfoFormat( |
diff --git a/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs b/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs index 9b44cc1..76d0b6f 100644 --- a/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs +++ b/OpenSim/Framework/Servers/HttpServer/AsynchronousRestObjectRequester.cs | |||
@@ -28,18 +28,22 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using System.Net; | 30 | using System.Net; |
31 | using System.Reflection; | ||
31 | using System.Text; | 32 | using System.Text; |
32 | using System.Xml; | 33 | using System.Xml; |
33 | using System.Xml.Serialization; | 34 | using System.Xml.Serialization; |
35 | using log4net; | ||
34 | 36 | ||
35 | namespace OpenSim.Framework.Servers.HttpServer | 37 | namespace OpenSim.Framework.Servers.HttpServer |
36 | { | 38 | { |
37 | public class AsynchronousRestObjectRequester | 39 | public class AsynchronousRestObjectRequester |
38 | { | 40 | { |
41 | //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
39 | /// <summary> | 43 | /// <summary> |
40 | /// Perform an asynchronous REST request. | 44 | /// Perform an asynchronous REST request. |
41 | /// </summary> | 45 | /// </summary> |
42 | /// <param name="verb"></param> | 46 | /// <param name="verb">GET or POST</param> |
43 | /// <param name="requestUrl"></param> | 47 | /// <param name="requestUrl"></param> |
44 | /// <param name="obj"></param> | 48 | /// <param name="obj"></param> |
45 | /// <param name="action"></param> | 49 | /// <param name="action"></param> |
@@ -52,6 +56,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
52 | public static void MakeRequest<TRequest, TResponse>(string verb, | 56 | public static void MakeRequest<TRequest, TResponse>(string verb, |
53 | string requestUrl, TRequest obj, Action<TResponse> action) | 57 | string requestUrl, TRequest obj, Action<TResponse> action) |
54 | { | 58 | { |
59 | //m_log.DebugFormat("[ASYNC REQUEST]: Starting {0} on {1}", verb, requestUrl); | ||
60 | |||
55 | Type type = typeof (TRequest); | 61 | Type type = typeof (TRequest); |
56 | 62 | ||
57 | WebRequest request = WebRequest.Create(requestUrl); | 63 | WebRequest request = WebRequest.Create(requestUrl); |
@@ -119,6 +125,8 @@ namespace OpenSim.Framework.Servers.HttpServer | |||
119 | { | 125 | { |
120 | } | 126 | } |
121 | 127 | ||
128 | // m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString()); | ||
129 | |||
122 | action(deserial); | 130 | action(deserial); |
123 | }, null); | 131 | }, null); |
124 | } | 132 | } |