aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
index 84e52f7..5d90b97 100644
--- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
+++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/RegionInfoCache.cs
@@ -385,7 +385,6 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
385 storage[handle] = region; 385 storage[handle] = region;
386 byname[region.RegionName] = handle; 386 byname[region.RegionName] = handle;
387 byuuid[region.RegionID] = handle; 387 byuuid[region.RegionID] = handle;
388
389 } 388 }
390 389
391 public void Remove(GridRegion region) 390 public void Remove(GridRegion region)
@@ -400,7 +399,13 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
400 399
401 ulong handle = region.RegionHandle & HANDLEMASK; 400 ulong handle = region.RegionHandle & HANDLEMASK;
402 if(storage != null) 401 if(storage != null)
403 storage.Remove(handle); 402 {
403 if(storage.ContainsKey(handle))
404 {
405 storage[handle] = null;
406 storage.Remove(handle);
407 }
408 }
404 removeFromInner(region); 409 removeFromInner(region);
405 if(expires != null) 410 if(expires != null)
406 { 411 {
@@ -610,8 +615,10 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
610 if(byuuid != null) 615 if(byuuid != null)
611 byuuid.Remove(r.RegionID); 616 byuuid.Remove(r.RegionID);
612 removeFromInner(r); 617 removeFromInner(r);
618
619 storage[h] = null;
620 storage.Remove(h);
613 } 621 }
614 storage.Remove(h);
615 } 622 }
616 if(expires != null) 623 if(expires != null)
617 expires.Remove(h); 624 expires.Remove(h);
@@ -693,7 +700,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
693 700
694 public class RegionsExpiringCache 701 public class RegionsExpiringCache
695 { 702 {
696 const double CACHE_PURGE_HZ = 60; // seconds 703 const double CACHE_PURGE_TIME = 60000; // milliseconds
697 const int MAX_LOCK_WAIT = 10000; // milliseconds 704 const int MAX_LOCK_WAIT = 10000; // milliseconds
698 705
699 /// <summary>For thread safety</summary> 706 /// <summary>For thread safety</summary>
@@ -702,7 +709,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
702 object isPurging = new object(); 709 object isPurging = new object();
703 710
704 Dictionary<UUID, RegionInfoForScope> InfobyScope = new Dictionary<UUID, RegionInfoForScope>(); 711 Dictionary<UUID, RegionInfoForScope> InfobyScope = new Dictionary<UUID, RegionInfoForScope>();
705 private System.Timers.Timer timer = new System.Timers.Timer(TimeSpan.FromSeconds(CACHE_PURGE_HZ).TotalMilliseconds); 712 private System.Timers.Timer timer = new System.Timers.Timer(CACHE_PURGE_TIME);
706 713
707 public RegionsExpiringCache() 714 public RegionsExpiringCache()
708 { 715 {