Stops / Closes the server.
162336
public void close(Handler<AsyncResult<Void>> completion) {
        if (context == null) {
            context = vertx.getOrCreateContext();
        }

        context.runOnContext(v -> {
            if (http != null) {
                http.close(event -> {
                    logger.info("The server '{}' has been stopped (bound port: {})", name, port);
                    completion.handle(Future.<Void>succeededFuture());
                });
            }
        });
    }
159564
def end(self):
        """"""
        if not self.args.disable_autodiscover:
            self.autodiscover_client.close()
        self.server.end()
307269
def close(self):
        
        if self._server is None:
            raise RuntimeError('Server is not started')
        self._server.close()
        for handler in self._handlers:
            handler.close()
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='')
954324
synchronized void stop(){
        if(status.equals("stopped"))
            return;
        long t = System.currentTimeMillis();
        run = false;

        try {
            serverSocket.close();
        } catch (IOException e) {
            throw S1SystemError.wrap(e);
        }

        executor.shutdown();
        while (!executor.isTerminated()) {
        }

        status = "stopped";
        LOG.info("Node "+nodeId+" file server stopped ("+(System.currentTimeMillis()-t)+" ms.)");
    }
816876
protected function stop()
    {
        $pid = $this->getCurrentPid();

        if (! $this->isRunning($pid)) {
            $this->error("Failed! There is no swoole_http_server process running.");

            return;
        }

        $this->info('Stopping swoole http server...');

        $isRunning = $this->killProcess($pid, SIGTERM, 15);

        if ($isRunning) {
            $this->error('Unable to stop the swoole_http_server process.');

            return;
        }

        // I don't known why Swoole didn't trigger "onShutdown" after sending SIGTERM.
        // So we should manually remove the pid file.
        $this->removePidFile();

        $this->info('> success');
    }
570169
def stop
      server = Communist.servers.delete(app.object_id) { |s| NullServer.new }
      if Communist.server.respond_to?(:shutdown)
        server.shutdown
      elsif Communist.server.respond_to?(:stop!)
        server.stop!
      else
        server.stop
      end
      @server_thread.join
    end
278778
def stop(self):
        

        # Stopping the server will cause its `serve_forever()` method
        # to return, which will cause the server thread to terminate.
        # TODO: Describe how the processing threads terminate.

        if self._http_server:
            self._http_server.shutdown()
            self._http_server.server_close()
            self._http_server = None
            self._http_thread = None

        if self._https_server:
            self._https_server.shutdown()
            self._https_server.server_close()
            self._https_server = None
            self._https_thread = None
1007687
public function stop() {
      if ($this->isStopping)
        return;
      $this->isStopping = true;

      $this->buffer = '';
      $this->connectRetryCount = 0;
      $this->readRetryCount = 0;

      if ($this->request) {
        $this->request->close();
        $this->request = null;
      }
      if ($this->response) {
        $this->response->close();
        $this->response = null;
      }

      $this->isStopping = false;
    }
563968
def close(self):
        
        if self._publish:
            self._events.put((self._listener.publish_server_closed,
                              (self._description.address, self._topology_id)))
        self._monitor.close()
        self._pool.reset()
1325640
public synchronized void close() throws IOException, InterruptedException {
		if (isClosed){
			return;
		}

		logger.info("closing server endpoint");
		idPriv.destroyId();
		group.unregisterServerEp(this);
		isClosed = true;
	}
114503
public void stop() throws InterruptedException {
		if (!isStarted.get()) {
			throw new IllegalStateException("The StreamServer is not started");
		}
		stopServer();
		stopClients();
		closeSocket();
		try {
			waitForServerToTerminate();
			isStarted.set(false);
			stopServer();
		} catch (InterruptedException e) {
			logger.error("InterruptedException while waiting for termination", e);
			throw e;
		}
	}
1287694
async def close(self):
        '''
        '''
        if self.server:
            self.server.close()
            await self.server.wait_closed()
            self.server = None
264747
def shutdown_server(self):
        """"""
        self.log.debug('shutdown_server: in')
        if self.ensime and self.toggle_teardown:
            self.ensime.stop()
860539
protected void stopAndReleaseGrpcServer() {
        factory.destroy();
        Server localServer = this.server;
        if (localServer != null) {
            localServer.shutdown();
            this.server = null;
            log.info("gRPC server shutdown.");
        }
    }
179503
@Override
    public synchronized void stop() {
        Preconditions.checkNotNull(getServer());
        if (getServer().isRunning()) {
            try {
                log.info("Stopping...");
                getServer().stop();
                log.info("STOPPED.");
            } catch (Exception e) {
                Throwable t = Throwables.getRootCause(e);
                log.error("Fathom failed on shutdown!", t);
            }
        }
    }
150112
def close(self):
        
        logger.info("Stop server")
        self.stopped.set()
        for event in self.to_be_stopped:
            event.set()
        self._socket.close()