Changeset 14061 for branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
- Timestamp:
- 07/13/16 19:13:03 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
r14060 r14061 6 6 using DistributedGA.Core.Interface; 7 7 using System.Timers; 8 using System.Threading.Tasks; 8 9 9 10 namespace DistributedGA.Core.Implementation { … … 30 31 cachedPeerList = new List<PeerInfo>(); 31 32 rand = new Random(); 33 //Init 34 Task.Factory.StartNew(() => RefreshPeerList(this, null), TaskCreationOptions.LongRunning); 32 35 //Start heartbeat timer 33 timer = new Timer(1000 * 20); //each 20 seconds36 timer = new Timer(1000 * 10); //each 10 seconds 34 37 timer.Elapsed += RefreshPeerList; 35 38 timer.Start(); … … 45 48 using (var myChannelFactory = new ChannelFactory<IContactService>(binding, endpoint)) { 46 49 using (IClientChannel client = (IClientChannel)myChannelFactory.CreateChannel()) { 47 ((IContactService)client).MakeLog(myself, msg); 50 ((IContactService)client).MakeLog(myself, msg); 48 51 } 49 52 } … … 83 86 using (var myChannelFactory = new ChannelFactory<IContactService>(binding, endpoint)) { 84 87 using (IClientChannel client = (IClientChannel)myChannelFactory.CreateChannel()) { 85 allPeers = ((IContactService)client).GetPeerList(myself); 88 allPeers = ((IContactService)client).GetPeerList(myself); 86 89 } 87 90 }
Note: See TracChangeset
for help on using the changeset viewer.