Stop the mock server
12866
function (options, callback) {
    if (this.stopMockServerFunc) {
      this.stopMockServerFunc(options, callback);
    } else if (this.mockServer) {
      this.mockServer.stop(callback);
    } else {
      callback();
    }
  }
792258
def stop(self, reason=''):
        
        key = '/status/sessions/terminate?sessionId=%s&reason=%s' % (self.session[0].id, quote_plus(reason))
        return self._server.query(key)
780584
public synchronized void stop() {
		running = false;
		pool.shutdown();
		try {
			if (!pool.awaitTermination(60, TimeUnit.SECONDS))
				pool.shutdownNow();
			if (!serverSocket.isClosed())
				this.serverSocket.close();
		} catch (IOException e) {
			DBP.printerror("Error closing Socket.");
			DBP.printException(e);
		} catch (InterruptedException ie) {
			DBP.printerror("Error shutting down threadpool.");
			DBP.printException(ie);
			// (Re-)Cancel if current thread also interrupted
			pool.shutdownNow();
			// Preserve interrupt status
			Thread.currentThread().interrupt();
		}
	}
641502
@TaskAction
  public void stopAction() {
    DevServer server =
        devServers.newDevAppServer(CloudSdkOperations.getDefaultHandler(getLogger()));
    try {
      server.stop(runConfig.toStopConfiguration());
    } catch (AppEngineException ex) {
      getLogger().error("Failed to stop server: " + ex.getMessage());
    }
  }
1083304
private void stop() {
        if (m_bRunning) {
            instance().m_logger.info("Doradus Server shutting down");
            stopServices();
            ServerParams.unload();
            m_bRunning = false;
            m_bInitialized = false;
        }
    }
611738
def _stop(sas, cmd_args):
    """"""
    if not cmd_args.force:
        status = sas.get_instance_status()
        jobs = int(status['job_count'])
        if jobs:
            return status
    return sas.stop_instance()
1284608
def terminate(self):
    """"""
    # Tear down the Pailgun TCPServer.
    if self.pailgun:
      self.pailgun.server_close()

    super(PailgunService, self).terminate()
264747
def shutdown_server(self):
        """"""
        self.log.debug('shutdown_server: in')
        if self.ensime and self.toggle_teardown:
            self.ensime.stop()
997224
def stop(self):
        
        if self._fd is not None:
            self._pollobj.unregister(self._fd)
            os.close(self._fd)
            self._fd = None
        self._sys_proc_fun = None
811146
def stop(self, timeout_s=None):
    """"""
    self._live = False
    try:
      self._sock.shutdown(socket.SHUT_RDWR)
      self._sock.close()
    except socket.error:
      pass
    self.join(timeout_s)
1101455
public void stop() throws Exception {
        // verify server isn't null
        if (server == null) {
            throw new NullPointerException("Internal server instance was null, server already stopped perhaps?");
        }
        
        logger.info("HttpServer [{}] on [{}] stopping...", configuration.safeGetName(), configuration.getPortString());

        server.stop();

        logger.info("HttpServer [{}] on [{}] stopped", configuration.safeGetName(), configuration.getPortString());
    }
18655
public void stop() {
    try {
      if (server != null) {
        server.stop();
        server.join();
      }
    } catch (Exception e) {
      LOG.warn("Got exception shutting down proxy", e);
    }
  }
847093
async def terminate(self) -> None:
        """"""
        await asyncio.sleep(config.shutdown_wait)
        # stop server and close loop if no more connection exists
        if not is_connected():
            stop_server(self.application.server)
            self.application.loop.stop()
810858
def stop(self):
        '''
        
        '''
        log.info('Stopping the TCP listener')
        self.__up = False
        try:
            self.skt.shutdown(socket.SHUT_RDWR)
        except socket.error:
            log.error('The following error may not be critical:', exc_info=True)
        self.skt.close()
503607
async def stoplisten(self, vhost = None):
        '''
        
        '''
        servers = self.getservers(vhost)
        for s in servers:
            await s.stoplisten()
        return len(servers)
933355
def cancel_requests(self):
        """"""
        self._timer.stop()
        self._job = None
        self._args = None
        self._kwargs = None
45339
def stop_playback(self):
        """"""
        self._sink.flush()
        self._sink.stop()
        self._playing = False