Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/19/16 09:57:22 (9 years ago)
Author:
thasling
Message:

PeerList now is fetched from the server each time the peerlist is needed

Location:
branches/thasling/DistributedGA/DistributedGA.Core/Implementation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs

    r13553 r13554  
    4646
    4747        peerListManager = new WcfPeerListManager();
    48         //peerListManager = new TestPeerListManager();
    4948        peerListManager.Init(ownInstance);
    5049
  • branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs

    r13541 r13554  
    1515    private PeerInfo myself = null;
    1616
    17     List<PeerInfo> allPeers = null;
    18     List<PeerInfo> peersForMessaging = null;
    19 
    2017    public void Init(PeerInfo source) {
    2118      serverString = ConfigurationManager.AppSettings["ContactServerURL"];
     
    2623
    2724    public List<PeerInfo> GetPeerList() {
    28       //TODO: maybe always request a new list from the contact server so that he can refresh the heartbeat...
    29       if (allPeers == null) {
    30         allPeers = client.GetPeerList(myself);
    31         peersForMessaging = ChoosePeersForMessaging(allPeers);
    32       }
     25      var allPeers = client.GetPeerList(myself);
     26      var peersForMessaging = ChoosePeersForMessaging(allPeers);
    3327      //return peersForMessaging;
    3428      return allPeers; //TODO: Enable 10% list communication
Note: See TracChangeset for help on using the changeset viewer.