Stop the server on the leader.
422886
def _stopLeader(cls):
        
        with cls.lock:
            assert cls.initialized > 0
            cls.initialized -= 1
            if cls.initialized == 0:
                if cls.loggingServer:
                    log.info('Stopping real-time logging server.')
                    cls.loggingServer.shutdown()
                    cls.loggingServer = None
                if cls.serverThread:
                    log.info('Joining real-time logging server thread.')
                    cls.serverThread.join()
                    cls.serverThread = None
                for k in list(os.environ.keys()):
                    if k.startswith(cls.envPrefix):
                        os.environ.pop(k)
541033
def Stop(self):
    """"""
    self._Close()

    if self._rpc_thread.isAlive():
      self._rpc_thread.join()
    self._rpc_thread = None
793271
def stop(self):
        """"""

        msg = ''
        if self._process:
            _stop_process(self._process, 'Server process')
        else:
            msg += 'Server not started.\n'
        if msg:
            print(msg, end='')
190716
public void stop() {
    running = false;
    if (server != null) server.stop();
    if (aggregateDaemon != null) aggregateDaemon.interrupt();
  }
941767
public function stop()
    {
        // Try to emit onWorkerStop callback.
        if ($this->onWorkerStop) {
            try {
                call_user_func($this->onWorkerStop, $this);
            } catch (\Exception $e) {
                self::log($e);
                exit(250);
            } catch (\Error $e) {
                self::log($e);
                exit(250);
            }
        }
        // Remove listener for server socket.
        if ($this->_mainSocket) {
            self::$globalEvent->del($this->_mainSocket, EventInterface::EV_READ);
            @fclose($this->_mainSocket);
        }
    }
433709
@Override
    public void notLeader() {
        LOG.warn("Server instance with server id {} is removed as leader", serverId);
        serviceState.becomingPassive();
        for (ActiveStateChangeHandler handler: activeStateChangeHandlers) {
            try {
                handler.instanceIsPassive();
            } catch (AtlasException e) {
                LOG.error("Error while reacting to passive state.", e);
            }
        }
        serviceState.setPassive();
    }
799178
def stop(self):
        """"""
        if self._progressing:
            self._progressing = False
            self._thread.join()
344608
def stop(self):
        
        if self._stack:
            try:
                self._stack.teardown()
            except Exception:
                self.fatal(sys.exc_info())

        super().stop()
1340176
public void stop() {
    if (server == null) {
      return;
    }

    logger.fine("Shutting down STP connection listener");
    monitor.remove(server);
    try {
      server.close();
    } catch (IOException e) {
      // ignored
    } finally {
      server = null;
    }
  }
739376
public void stop()
	{
		try
		{
			stopping = true;
			myServerSocket.close();
			myThread.join();
		}
		catch ( IOException | InterruptedException e ) {
			logger.log(Level.WARNING, "Had unexpected exception during stop", e);
		}
	}
954533
def stop(self):
        '''
        
        '''
        assert(self.model)
        assert(self.user_interface)
        assert(self.target)
        self.user_interface.stop()
        self.target.teardown()
        self.dataman.submit_task(None)
        self._un_set_signal_handler()
699664
def stop(self):
        
        if self.is_run:
            self._service.shutdown()
            self._service.server_close()
877323
def stop(self):
        """"""
        with self.lock:
            self._message_received(ConnectionClosed(self._file, self))
473460
async def stop(self):
        """"""

        self._logger.info("Stopping all servers")
        for server in self.servers:
            await server.stop()

        self._logger.info("Stopping all device adapters")
        await self.device_manager.stop()
18655
public void stop() {
    try {
      if (server != null) {
        server.stop();
        server.join();
      }
    } catch (Exception e) {
      LOG.warn("Got exception shutting down proxy", e);
    }
  }
756010
def Shutdown(self):
        """"""
        logger.debug("Nodeleader shutting down")

        self.stop_peer_check_loop()
        self.peer_check_loop_deferred = None

        self.stop_check_bcr_loop()
        self.check_bcr_loop_deferred = None

        self.stop_memcheck_loop()
        self.memcheck_loop_deferred = None

        self.stop_blockheight_loop()
        self.blockheight_loop_deferred = None

        for p in self.Peers:
            p.Disconnect()
764103
public void stop() {
    if (httpHandler != null) {
      httpHandler.shutdown();
    }
    if (server != null) {
      ServerTools.print("Stopping server...");
      server.stop(5);
      isRunning = false;
      ServerTools.print("Server stopped");
    }
  }