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; }
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; }