aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/MessagingServer
diff options
context:
space:
mode:
authorMelanie Thielker2008-11-17 05:04:33 +0000
committerMelanie Thielker2008-11-17 05:04:33 +0000
commitfa50156b4c2db13fa5c425dca48d1abfac404b6b (patch)
tree46dad432ccbe63313f75b4235dda95a78abe57c2 /OpenSim/Grid/MessagingServer
parentFix previous build break (diff)
downloadopensim-SC-fa50156b4c2db13fa5c425dca48d1abfac404b6b.zip
opensim-SC-fa50156b4c2db13fa5c425dca48d1abfac404b6b.tar.gz
opensim-SC-fa50156b4c2db13fa5c425dca48d1abfac404b6b.tar.bz2
opensim-SC-fa50156b4c2db13fa5c425dca48d1abfac404b6b.tar.xz
Make the messageing server re-register with all it's user servers every five
minutes. This ensures that things don't get messy if a user server is restarted and the user server's operator has no control over the host the message servers run on.
Diffstat (limited to 'OpenSim/Grid/MessagingServer')
-rw-r--r--OpenSim/Grid/MessagingServer/MessageService.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs
index 5841672..77da306 100644
--- a/OpenSim/Grid/MessagingServer/MessageService.cs
+++ b/OpenSim/Grid/MessagingServer/MessageService.cs
@@ -29,8 +29,8 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection;
33using System.Threading; 32using System.Threading;
33using System.Reflection;
34using OpenMetaverse; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
@@ -52,6 +52,8 @@ namespace OpenSim.Grid.MessagingServer
52 // a dictionary of all current regions this server knows about 52 // a dictionary of all current regions this server knows about
53 private Dictionary<ulong, RegionProfileData> m_regionInfoCache = new Dictionary<ulong,RegionProfileData>(); 53 private Dictionary<ulong, RegionProfileData> m_regionInfoCache = new Dictionary<ulong,RegionProfileData>();
54 54
55 private System.Timers.Timer reconnectTimer = new System.Timers.Timer(300000); // 5 mins
56
55 public MessageService(MessageServerConfig cfg) 57 public MessageService(MessageServerConfig cfg)
56 { 58 {
57 m_cfg = cfg; 59 m_cfg = cfg;
@@ -61,6 +63,9 @@ namespace OpenSim.Grid.MessagingServer
61 uc.DatabaseProvider = cfg.DatabaseProvider; 63 uc.DatabaseProvider = cfg.DatabaseProvider;
62 64
63 m_userManager.AddPlugin(cfg.DatabaseProvider, cfg.DatabaseConnect); 65 m_userManager.AddPlugin(cfg.DatabaseProvider, cfg.DatabaseConnect);
66
67 reconnectTimer.Elapsed += registerWithUserServer;
68 reconnectTimer.Start();
64 } 69 }
65 70
66 71
@@ -497,6 +502,11 @@ namespace OpenSim.Grid.MessagingServer
497 return regionProfile; 502 return regionProfile;
498 } 503 }
499 504
505 public void registerWithUserServer(object sender, System.Timers.ElapsedEventArgs e)
506 {
507 registerWithUserServer();
508 }
509
500 public bool registerWithUserServer () 510 public bool registerWithUserServer ()
501 { 511 {
502 Hashtable UserParams = new Hashtable(); 512 Hashtable UserParams = new Hashtable();