PingService() public static method

Pings the web service to help in shutdown.
public static PingService ( string hostname ) : void
hostname string The hostname to use.
return void
 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;
 }