/// <summary> /// Stop the server instance /// </summary> public static void Stop() { if (instance != null) { instance.Shutdown(); instance = null; ReleaseModules(); if (service != null) { service.Stop(); } else { WinForms.Application.Exit(); } } // Don't need this thread reference any more :) if (shutdownThread != null) { shutdownThread = null; } }