Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/07/09 15:31:58 (16 years ago)
Author:
kgrading
Message:

login bugfixing for (#401)

File:
1 edited

Legend:

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

    r1036 r1081  
    2828
    2929    public event EventHandler ConnectionRestored;   
    30     public event EventHandler ServerChanged;   
     30    public event EventHandler ServerChanged;
     31    public event EventHandler Connected;   
    3132
    3233    public ClientCommunicatorClient proxy = null;
     
    3738    public void Connect() {
    3839      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        );
    4644
    4745        proxy.LoginCompleted += new EventHandler<LoginCompletedEventArgs>(proxy_LoginCompleted);
     
    4947        proxy.SendJobResultCompleted += new EventHandler<SendJobResultCompletedEventArgs>(proxy_SendJobResultCompleted);
    5048        proxy.SendHeartBeatCompleted += new EventHandler<SendHeartBeatCompletedEventArgs>(proxy_SendHeartBeatCompleted);
    51 
     49        proxy.Open();       
     50        if (Connected != null)
     51          Connected(this, new EventArgs());           
    5252        if (ConnState == NetworkEnum.WcfConnState.Failed)
    5353          ConnectionRestored(this, new EventArgs());
Note: See TracChangeset for help on using the changeset viewer.