aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors
diff options
context:
space:
mode:
authorUbitUmarov2018-01-18 13:04:05 +0000
committerUbitUmarov2018-01-18 13:04:05 +0000
commite89f1e635b2933e6e43628d8d06a457d8ad1ea02 (patch)
tree701370883b6943de4e476b546f74e369631a6d6c /OpenSim/Services/Connectors
parentOoops worng ';' (diff)
downloadopensim-SC-e89f1e635b2933e6e43628d8d06a457d8ad1ea02.zip
opensim-SC-e89f1e635b2933e6e43628d8d06a457d8ad1ea02.tar.gz
opensim-SC-e89f1e635b2933e6e43628d8d06a457d8ad1ea02.tar.bz2
opensim-SC-e89f1e635b2933e6e43628d8d06a457d8ad1ea02.tar.xz
fail to connect to estates service is a fatal error
Diffstat (limited to 'OpenSim/Services/Connectors')
-rw-r--r--OpenSim/Services/Connectors/Estate/EstateDataConnector.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs
index b9a6281..0971b38 100644
--- a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs
+++ b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs
@@ -195,6 +195,14 @@ namespace OpenSim.Services.Connectors
195 string uri = m_ServerURI + string.Format("/estates/estate/?region={0}&create={1}", regionID, create); 195 string uri = m_ServerURI + string.Format("/estates/estate/?region={0}&create={1}", regionID, create);
196 196
197 reply = MakeRequest("GET", uri, string.Empty); 197 reply = MakeRequest("GET", uri, string.Empty);
198 if(reply == null)
199 {
200 // this is a fatal error
201 m_log.DebugFormat("[ESTATE CONNECTOR] connection to remote estates service failed");
202 m_log.DebugFormat("[ESTATE CONNECTOR] simulator needs to terminate");
203 Environment.Exit(-1);
204 }
205
198 if (String.IsNullOrEmpty(reply)) 206 if (String.IsNullOrEmpty(reply))
199 return null; 207 return null;
200 208
@@ -308,7 +316,8 @@ namespace OpenSim.Services.Connectors
308 string reply = string.Empty; 316 string reply = string.Empty;
309 try 317 try
310 { 318 {
311 reply = SynchronousRestFormsRequester.MakeRequest(verb, uri, formdata, m_Auth); 319 reply = SynchronousRestFormsRequester.MakeRequest(verb, uri, formdata, 30, m_Auth);
320 return reply;
312 } 321 }
313 catch (WebException e) 322 catch (WebException e)
314 { 323 {
@@ -317,14 +326,17 @@ namespace OpenSim.Services.Connectors
317 if (hwr != null) 326 if (hwr != null)
318 { 327 {
319 if (hwr.StatusCode == HttpStatusCode.NotFound) 328 if (hwr.StatusCode == HttpStatusCode.NotFound)
329 {
320 m_log.Error(string.Format("[ESTATE CONNECTOR]: Resource {0} not found ", uri)); 330 m_log.Error(string.Format("[ESTATE CONNECTOR]: Resource {0} not found ", uri));
331 return reply;
332 }
321 if (hwr.StatusCode == HttpStatusCode.Unauthorized) 333 if (hwr.StatusCode == HttpStatusCode.Unauthorized)
322 m_log.Error(string.Format("[ESTATE CONNECTOR]: Web request {0} requires authentication ", uri)); 334 m_log.Error(string.Format("[ESTATE CONNECTOR]: Web request {0} requires authentication ", uri));
323 } 335 }
324 else 336 else
325 m_log.Error(string.Format( 337 m_log.Error(string.Format(
326 "[ESTATE CONNECTOR]: WebException for {0} {1} {2} {3}", 338 "[ESTATE CONNECTOR]: WebException for {0} {1} {2} {3}",
327 verb, uri, formdata, e)); 339 verb, uri, formdata, e.Message));
328 } 340 }
329 } 341 }
330 catch (Exception e) 342 catch (Exception e)
@@ -332,7 +344,7 @@ namespace OpenSim.Services.Connectors
332 m_log.DebugFormat("[ESTATE CONNECTOR]: Exception when contacting estate server at {0}: {1}", uri, e.Message); 344 m_log.DebugFormat("[ESTATE CONNECTOR]: Exception when contacting estate server at {0}: {1}", uri, e.Message);
333 } 345 }
334 346
335 return reply; 347 return null;
336 } 348 }
337 } 349 }
338} 350}