diff options
author | Justin Clark-Casey (justincc) | 2014-11-28 01:16:30 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-28 01:16:30 +0000 |
commit | 09534f378e7362137f5fcfc18f56bd3eb8cd1ce6 (patch) | |
tree | 3f47febfcb74ce00b643b8cf1e24fbac38a9308d /OpenSim/Region/CoreModules | |
parent | Remove unmaintained MSSQL support. (diff) | |
download | opensim-SC_OLD-09534f378e7362137f5fcfc18f56bd3eb8cd1ce6.zip opensim-SC_OLD-09534f378e7362137f5fcfc18f56bd3eb8cd1ce6.tar.gz opensim-SC_OLD-09534f378e7362137f5fcfc18f56bd3eb8cd1ce6.tar.bz2 opensim-SC_OLD-09534f378e7362137f5fcfc18f56bd3eb8cd1ce6.tar.xz |
Avoid repeated lag-generating continuous attempts to retrieve HG service Urls in UMM if the initial request fails, possibly due to the home URL not being present
Instead, the failure information is effectively added to the memory cache (so no persistence over simualtor sessions).
A future improvement may be to invalidate negative cache results after some time has passed in case the failure was transient.
Looks to resolve http://opensimulator.org/mantis/view.php?id=7382
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index 8892623..9bf7885 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs | |||
@@ -462,12 +462,14 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
462 | { | 462 | { |
463 | // m_log.DebugFormat("[USER MANAGEMENT MODULE]: Requested url type {0} for {1}", serverType, userID); | 463 | // m_log.DebugFormat("[USER MANAGEMENT MODULE]: Requested url type {0} for {1}", serverType, userID); |
464 | 464 | ||
465 | if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null) | 465 | if (userdata.ServerURLs != null) |
466 | { | 466 | { |
467 | return userdata.ServerURLs[serverType].ToString(); | 467 | object url; |
468 | } | ||
469 | 468 | ||
470 | if (!string.IsNullOrEmpty(userdata.HomeURL)) | 469 | if (userdata.ServerURLs.TryGetValue(serverType, out url)) |
470 | return url.ToString(); | ||
471 | } | ||
472 | else if (!string.IsNullOrEmpty(userdata.HomeURL)) | ||
471 | { | 473 | { |
472 | //m_log.DebugFormat( | 474 | //m_log.DebugFormat( |
473 | // "[USER MANAGEMENT MODULE]: Did not find url type {0} so requesting urls from '{1}' for {2}", | 475 | // "[USER MANAGEMENT MODULE]: Did not find url type {0} so requesting urls from '{1}' for {2}", |
@@ -483,9 +485,11 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement | |||
483 | m_log.Debug("[USER MANAGEMENT MODULE]: GetServerURLs call failed ", e); | 485 | m_log.Debug("[USER MANAGEMENT MODULE]: GetServerURLs call failed ", e); |
484 | userdata.ServerURLs = new Dictionary<string, object>(); | 486 | userdata.ServerURLs = new Dictionary<string, object>(); |
485 | } | 487 | } |
486 | 488 | ||
487 | if (userdata.ServerURLs != null && userdata.ServerURLs.ContainsKey(serverType) && userdata.ServerURLs[serverType] != null) | 489 | object url; |
488 | return userdata.ServerURLs[serverType].ToString(); | 490 | |
491 | if (userdata.ServerURLs.TryGetValue(serverType, out url)) | ||
492 | return url.ToString(); | ||
489 | } | 493 | } |
490 | } | 494 | } |
491 | 495 | ||