Removes a server.
351966
public void removeServer(InternalInstrumented<ServerStats> server) {
    remove(servers, server);
    ServerSocketMap prev = perServerSockets.remove(id(server));
    assert prev != null;
    assert prev.isEmpty();
  }
629251
def close(self):
        """"""
        try:
            try:
                self.connection.quit()
            except socket.sslerror:
                # This happens when calling quit() on a TLS connection
                # sometimes.
                self.connection.close()
            except Exception as e:
                logger.error(
                    "Error trying to close connection to server " "%s:%s: %s",
                    self.host,
                    self.port,
                    e,
                )
                if self.fail_silently:
                    return
                raise
        finally:
            self.connection = None
487508
def stop(self):
        """"""
        self._done()
        if self._server:
            self._server.stop()
            self._server = None
        log.info('Stop!')
176508
def teardown(self):
        """"""
        self.log.debug('teardown: in')
        self.running = False
        self.shutdown_server()
        shutil.rmtree(self.tmp_diff_folder, ignore_errors=True)
69994
def stop_service
      DRb.remove_server(self)
      if  Thread.current['DRb'] && Thread.current['DRb']['server'] == self
        Thread.current['DRb']['stop_service'] = true
      else
        @thread.kill
      end
    end
893106
public void removeThreadPool(ServerConfig serverConfig) {
        Lookout.registry().removeMetric(rpcLookoutId.removeServerThreadConfigId(serverConfig));
        Lookout.registry().removeMetric(rpcLookoutId.removeServerThreadPoolActiveCountId(serverConfig));
        Lookout.registry().removeMetric(rpcLookoutId.removeServerThreadPoolIdleCountId(serverConfig));
        Lookout.registry().removeMetric(rpcLookoutId.removeServerThreadPoolQueueSizeId(serverConfig));
    }
266666
def destroy_rackspace(connection, region, instance_id):
    

    server = connection.servers.get(instance_id)
    log_yellow('deleting rackspace instance ...')
    server.delete()

    # wait for server to be deleted
    try:
        while True:
            server = connection.servers.get(server.id)
            log_yellow('waiting for deletion ...')
            sleep(5)
    except:
        pass
    log_green('The server has been deleted')
1071290
def server_close(self):
        
        if self.remove_file:
            try:
                os.remove(self.remove_file)
            except:
                pass
        self.socket.close()
754769
def kill(self):
        
        try:
            os.unlink(self.server_address)
        except OSError:
            if os.path.exists(self.server_address):
                raise
674978
def delete(self, key):
        """"""
        if self.servers:
            key = self._qualified_key(key)
            hashed_key = self.key_hasher(key)
            self.client.delete(hashed_key)
292889
def deallocate(self):
        """"""
        if self._domain is not None:
            domain_delete(self._domain, self.logger)
        if self._hypervisor is not None:
            try:
                self._hypervisor.close()
            except Exception:
                self.logger.exception("Unable to close hypervisor connection.")
458016
function Server_stop() {
  if (!this._wsStarted) throw Error("server not started")
  if (this._wsStopped) return

  this._wsStopped = true

  sessions.shutDown()
  this._wsServer.shutDown()

  this._wsServer.removeListener("request", this._onRequest)
  this._wsServer.removeListener("connect", onConnect)

  self._wsConfig  = null
  self._wsServer  = null
}
68769
def remove_connection(self, connection):
        """"""
        if not self._closing:
            self.connections.remove(connection)
            logger.debug("removed connection")
676802
def purge(self, connection):
        """"""
        self._checkpid()
        if connection.pid == self.pid:
            idx = connection._pattern_idx
            if connection in self._in_use_connections[idx]:
                self._in_use_connections[idx].remove(connection)
            else:
                self._available_connections[idx].remove(connection)
            connection.disconnect()
554820
public void removeServerFromCache(long serverId) {
        servers.computeIfPresent(serverId, (key, server) -> {
            ((Cleanupable) server).cleanup();
            return null;
        });
        nonReadyServers.computeIfPresent(serverId, (key, server) -> {
            ((Cleanupable) server).cleanup();
            return null;
        });
    }
164198
public static void unpopulateMBeanServer() {
		if(!populated)
			return;
		
		synchronized (lock) {
			populated = false;
			
			if (storageManager != null && storageManager.getPublicName() != null) {
				logger.info("Unregistering the StorageManager MXBean");
				try { 
					storageManager.deregister(); 
					storageManager.awaitJobTermination(2 * 60);
				} catch(Exception ex) {
					logger.warn("Can't unregister StorageManager MXBean.", ex);
				}
			}
			if (serverMonitor != null && serverMonitor.getPublicName() != null) {
				logger.info("Unregistering the ServerMonitor MXBean");
				try { 
					serverMonitor.deregister(); 
					serverMonitor.shutdown();
				} catch(Exception ex) {
					logger.warn("Can't unregister ServerMonitor MXBean.", ex);
				}
			}
			
			storageManager = null;
			serverMonitor = null;
		}
	}
1287694
async def close(self):
        '''
        '''
        if self.server:
            self.server.close()
            await self.server.wait_closed()
            self.server = None