public void Subscribed() { int tryCounter = 0; while (true) { try { proxy.Subscribed(); break; } catch (Exception) { tryCounter++; if (tryCounter.Equals(maxTry)) { throw; } Thread.Sleep(sleepTime); OpenChannel(); } } }
public void Subscribed() { int tryCounter = 0; while (true) { if (tryCounter.Equals(maxTry)) { throw new Exception("CASSubscriberProxy: Connection error."); } try { proxy.Subscribed(); break; } catch (Exception) { tryCounter++; Thread.Sleep(sleepTime); OpenChannel(); } } }