Changeset 1081
- Timestamp:
- 01/07/09 15:31:58 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs
r1036 r1081 28 28 29 29 public event EventHandler ConnectionRestored; 30 public event EventHandler ServerChanged; 30 public event EventHandler ServerChanged; 31 public event EventHandler Connected; 31 32 32 33 public ClientCommunicatorClient proxy = null; … … 37 38 public void Connect() { 38 39 try { 39 proxy = null; 40 if (proxy == null) { 41 proxy = new ClientCommunicatorClient( 42 new NetTcpBinding(), 43 new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/ClientCommunicator") 44 ); 45 } 40 proxy = new ClientCommunicatorClient( 41 new NetTcpBinding(), 42 new EndpointAddress("net.tcp://" + ServerIP + ":" + ServerPort + "/HiveServer/ClientCommunicator") 43 ); 46 44 47 45 proxy.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(proxy_LoginCompleted); … … 49 47 proxy.SendJobResultCompleted += new EventHandler<SendJobResultCompletedEventArgs>(proxy_SendJobResultCompleted); 50 48 proxy.SendHeartBeatCompleted += new EventHandler<SendHeartBeatCompletedEventArgs>(proxy_SendHeartBeatCompleted); 51 49 proxy.Open(); 50 if (Connected != null) 51 Connected(this, new EventArgs()); 52 52 if (ConnState == NetworkEnum.WcfConnState.Failed) 53 53 ConnectionRestored(this, new EventArgs()); -
trunk/sources/HeuristicLab.Hive.Client.Core/Core.cs
r1036 r1081 72 72 wcfService.ConnectionRestored += new EventHandler(wcfService_ConnectionRestored); 73 73 wcfService.ServerChanged += new EventHandler(wcfService_ServerChanged); 74 74 wcfService.Connected += new EventHandler(wcfService_Connected); 75 75 ConnectionContainer cc = ConfigManager.Instance.GetServerIPAndPort(); 76 76 if (cc.IPAdress != String.Empty && cc.Port != 0) { … … 189 189 190 190 void wcfService_ServerChanged(object sender, EventArgs e) { 191 foreach(KeyValuePair<long, AppDomain> entries in appDomains) 192 AppDomain.Unload(appDomains[entries.Key]); 193 appDomains = new Dictionary<long, AppDomain>(); 194 engines = new Dictionary<long, Executor>(); 191 lock (Locker) { 192 foreach (KeyValuePair<long, AppDomain> entries in appDomains) 193 AppDomain.Unload(appDomains[entries.Key]); 194 appDomains = new Dictionary<long, AppDomain>(); 195 engines = new Dictionary<long, Executor>(); 196 } 197 } 198 199 void wcfService_Connected(object sender, EventArgs e) { 195 200 wcfService.LoginAsync(ConfigManager.Instance.GetClientInfo()); 196 201 }
Note: See TracChangeset
for help on using the changeset viewer.