private void RunForever()
 {
     while (!finished)
     {
         try
         {
             connection.PerformSingleUpdate();
         }
         catch (System.Exception e)
         {
             crashError.Set(e);
             return;
         }
         Thread.Sleep(SLEEP_TIME);
     }
     // finished
     connection.networkClient.disconnect();
     connection.networkClient = null;
 }
Esempio n. 2
0
 private void RunForever()
 {
     while (!finished)
     {
         try
         {
             connection.PerformSingleUpdate();
         }
         catch (System.Exception e)
         {
             crashError.Set(e);
             connection.ResumeGame();
             return;
         }
         Thread.Sleep((int)(Instance.refreshDelay * 1000));
     }
     // finished
     connection.networkClient.disconnect();
     connection.networkClient = null;
 }