Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/08 16:52:28 (15 years ago)
Author:
kgrading
Message:

added a connectionRestored Event (#418)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Client.Communication/WcfService.cs

    r923 r924  
    2222    }
    2323
    24     public enum ConnectionState { connected, disconnected, failed };
     24    public enum ConnectionState { connected, disconnected, failed } 
     25    public ConnectionState ConnState { get; set; }
     26
     27    public event EventHandler ConnectionRestored;   
    2528
    2629    private ClientCommunicatorClient proxy = null;
    27 
    28     public ConnectionState ConnState { get; set; }
    29 
    3030    private string serverIP;
    3131    private string serverPort;
     
    4646        proxy.SendJobResultCompleted += new EventHandler<SendJobResultCompletedEventArgs>(proxy_SendJobResultCompleted);
    4747        proxy.SendHeartBeatCompleted += new EventHandler<SendHeartBeatCompletedEventArgs>(proxy_SendHeartBeatCompleted);
     48
     49        if (ConnState == ConnectionState.failed)
     50          ConnectionRestored(this, new EventArgs());
     51        ConnState = ConnectionState.connected;
     52
    4853      }
    4954      catch (Exception ex) {
Note: See TracChangeset for help on using the changeset viewer.