Esempio n. 1
0
        static public void stop()
        {
            Program.noStart = true;
            forceShutdown   = true;
            ConsoleHelpers.forceShutdown = true;

            // Stop the keepalive thread
            PresenceList.stopKeepAlive();

            // Stop the block processor
            blockProcessor.stopOperation();

            // Stop the block sync
            blockSync.stop();

            // Stop the API server
            if (apiServer != null)
            {
                apiServer.stop();
                apiServer = null;
            }

            // Stop the miner
            if (miner != null)
            {
                miner.stop();
                miner = null;
            }

            if (maintenanceThread != null)
            {
                maintenanceThread.Abort();
                maintenanceThread = null;
            }

            // Stop the block storage
            Storage.stopStorage();

            // stop activity storage
            ActivityStorage.stopStorage();

            // Stop the network queue
            NetworkQueue.stop();

            // Stop all network clients
            NetworkClientManager.stop();

            // Stop the network server
            NetworkServer.stopNetworkOperations();

            // Stop the console stats screen
            // Console screen has a thread running even if we are in verbose mode
            statsConsoleScreen.stop();

            NetDump.Instance.shutdown();

            presenceListActive = false;
        }