diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs index 4a06f6e..33899aa 100644 --- a/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/DataSnapshot/DataSnapshotManager.cs | |||
@@ -373,24 +373,27 @@ namespace OpenSim.Region.DataSnapshot | |||
373 | for (int i = 0; i < services.Length; i++) | 373 | for (int i = 0; i < services.Length; i++) |
374 | { | 374 | { |
375 | string url = services[i].Trim(); | 375 | string url = services[i].Trim(); |
376 | RestClient cli = new RestClient(url); | 376 | using (RestClient cli = new RestClient(url)) |
377 | cli.AddQueryParameter("service", serviceName); | ||
378 | cli.AddQueryParameter("host", m_hostname); | ||
379 | cli.AddQueryParameter("port", m_listener_port); | ||
380 | cli.AddQueryParameter("secret", m_Secret.ToString()); | ||
381 | cli.RequestMethod = "GET"; | ||
382 | try | ||
383 | { | ||
384 | reply = cli.Request(null); | ||
385 | } | ||
386 | catch (WebException) | ||
387 | { | 377 | { |
388 | m_log.Warn("[DATASNAPSHOT]: Unable to notify " + url); | 378 | cli.AddQueryParameter("service", serviceName); |
389 | } | 379 | cli.AddQueryParameter("host", m_hostname); |
390 | catch (Exception e) | 380 | cli.AddQueryParameter("port", m_listener_port); |
391 | { | 381 | cli.AddQueryParameter("secret", m_Secret.ToString()); |
392 | m_log.Warn("[DATASNAPSHOT]: Ignoring unknown exception " + e.ToString()); | 382 | cli.RequestMethod = "GET"; |
383 | try | ||
384 | { | ||
385 | reply = cli.Request(null); | ||
386 | } | ||
387 | catch (WebException) | ||
388 | { | ||
389 | m_log.Warn("[DATASNAPSHOT]: Unable to notify " + url); | ||
390 | } | ||
391 | catch (Exception e) | ||
392 | { | ||
393 | m_log.Warn("[DATASNAPSHOT]: Ignoring unknown exception " + e.ToString()); | ||
394 | } | ||
393 | } | 395 | } |
396 | |||
394 | byte[] response = new byte[1024]; | 397 | byte[] response = new byte[1024]; |
395 | // int n = 0; | 398 | // int n = 0; |
396 | try | 399 | try |