BF2Statistics.Web.HttpServer.Stop C# (CSharp) Метод

Stop() публичный статический Метод

Stops the ASP listener, and unbinds from the port.
public static Stop ( ) : void
Результат void
        public async static void Stop()
        {
            if (IsRunning)
            {
                // Call Stopping Event to disconnect clients
                if (Stopping != null)
                    Stopping(null, EventArgs.Empty);

                try
                {
                    // Stop listening for HTTP requests
                    Listener.Stop();

                    // Fire the stopped event
                    Stopped(null, EventArgs.Empty);
                }
                catch(Exception E)
                {
                    Program.ErrorLog.Write("ERROR: [HttpServer.Stop] " + E.Message);
                }

                SessionRequests = 0;
            }

            // Wait on pending Snapshots
            if (StatsManager.ImportTask != null && StatsManager.ImportTask.Status == TaskStatus.Running)
                await StatsManager.ImportTask;
        }