Changeset 5795 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveCommListener.cs
- Timestamp:
- 03/22/11 16:44:28 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/SlaveCommListener.cs
r5711 r5795 22 22 using System; 23 23 using System.ServiceModel; 24 using System.Threading; 24 25 using HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts; 25 26 … … 36 37 public void Open() { 37 38 pipeFactory = new DuplexChannelFactory<ISlaveCommunication>(this, "SlaveCommunicationServiceEndpoint"); 38 pipeProxy = pipeFactory.CreateChannel(); 39 pipeProxy.Subscribe(); 39 40 while (!ReconnectToSlaveCore()) { 41 Thread.Sleep(500); 42 } 43 } 44 45 public bool ReconnectToSlaveCore() { 46 try { 47 pipeProxy = pipeFactory.CreateChannel(); 48 pipeProxy.Subscribe(); 49 return true; 50 } 51 catch (Exception e) { 52 OnMessageLogged("Couldn't connect to Slave core. Is it possible that the Slave Core isn't running?\nException is: " + e.ToString()); 53 return false; 54 } 40 55 } 41 56
Note: See TracChangeset
for help on using the changeset viewer.