Beispiel #1
0
 protected ConnectionLostEventArgument DoConnectionLost(ConnectionLostEventArgument argument)
 {
     if (ConnectionLost != null)
     {
         ConnectionLost(this, argument);
     }
     if (Manager != null)
     {
         Manager.DoConnectionLost(argument);
     }
     return(argument);
 }
Beispiel #2
0
 internal void DoConnectionLost(ConnectionLostEventArgument argument)
 {
     if (ConnectionLost != null)
     {
         ConnectionLost(this, argument);
     }
     if (argument.Retry)
     {
         if (DefaultLogin == null || !(DefaultLogin is Connectors.LoginClient))
         {
             return;
         }
         var t = new System.Threading.Tasks.Task(() =>
         {
             System.Threading.Thread.Sleep(AutoReconectTime);
             var login = DefaultLogin as Connectors.LoginClient;
             login.Connect(login.ConnectTo);
         });
         t.Start();
     }
 }