private void StartShutdownMonitorThread() { while (Listening && (DateTime.Now < _shutdownTime)) { Thread.Sleep(100); } if (Listening) { Listening = false; } try { for (int i = 0; i < 3; i++) { TestServiceHelper.PingService(HostName); } } catch { } }
public void Stop() { if (Service.Listening) { Service.Listening = false; try { try { for (int i = 0; i < 5; i++) { TestServiceHelper.PingService(Service.HostName); } } catch (WebException) { } } catch { } } Thread = null; }