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