For this proxy shutdown is a no-op
429706
def shutdown(opts):
    '''
    
    '''
    log.debug('dummy proxy shutdown() called...')
    DETAILS = _load_state()
    if 'filename' in DETAILS:
        os.unlink(DETAILS['filename'])
265745
public void deactivateAll() {
        for (String scheme : new String[] {"http", "https"}) {
            InetSocketAddress originalProxy = originalProxies.remove(scheme);
            if (originalProxy != null) {
                System.setProperty(scheme + ".proxyHost", originalProxy.getHostName());
                System.setProperty(scheme + ".proxyPort", Integer.toString(originalProxy.getPort()));
            } else {
                System.clearProperty(scheme + ".proxyHost");
                System.clearProperty(scheme + ".proxyPort");
            }
        }

        if (originalNonProxyHosts.isEmpty()) {
            System.clearProperty("http.nonProxyHosts");
        } else {
            System.setProperty("http.nonProxyHosts", Joiner.on('|').join(originalNonProxyHosts));
        }
        originalNonProxyHosts.clear();
    }
1122790
protected void stopProxy() throws Exception {
    mProxyProcess.stop();
    if (mProxyThread != null) {
      while (mProxyThread.isAlive()) {
        LOG.info("Stopping thread {}.", mProxyThread.getName());
        mProxyThread.interrupt();
        mProxyThread.join(1000);
      }
      mProxyThread = null;
    }
  }
124605
def stop(self, dummy_signum=None, dummy_frame=None):
        
        logging.info('Shutting down ...')
        self.socket.close()
        sys.exit(0)
336414
function ProxySocket(proxy_port, proxy_addr, meta, proxy_opts) {
    stream.Duplex.call(this);

    this.connected_fn = null;
    this.proxy_addr   = proxy_addr;
    this.proxy_port   = proxy_port;
    this.proxy_opts   = proxy_opts || {};

    this.setMeta(meta || {});

    this.state = 'disconnected';
}
840550
@CLIMethod(name="shutdown")
    @RequirePOST
    public void doExit( StaplerRequest req, StaplerResponse rsp ) throws IOException {
        checkPermission(ADMINISTER);
        if (rsp!=null) {
            rsp.setStatus(HttpServletResponse.SC_OK);
            rsp.setContentType("text/plain");
            try (PrintWriter w = rsp.getWriter()) {
                w.println("Shutting down");
            }
        }

        new Thread("exit thread") {
            @Override
            public void run() {
                try {
                    ACL.impersonate(ACL.SYSTEM);
                    LOGGER.info(String.format("Shutting down VM as requested by %s from %s",
                            getAuthentication().getName(), req != null ? req.getRemoteAddr() : "???"));

                    cleanUp();
                    System.exit(0);
                } catch (Exception e) {
                    LOGGER.log(Level.WARNING, "Failed to shut down Jenkins", e);
                }
            }
        }.start();
    }
782015
def shutdown(host=None, port=None, db=None, password=None):
    '''
    
    '''
    server = _connect(host, port, db, password)
    try:
        # Return false if unable to ping server
        server.ping()
    except redis.ConnectionError:
        return False

    server.shutdown()
    try:
        # This should fail now if the server is shutdown, which we want
        server.ping()
    except redis.ConnectionError:
        return True
    return False
282413
public synchronized void forceNodeShutdown() {
        LOGGER.entering();

        // stop the node recycle thread
        stopNodeRecycleThread();

        // verify the servlet is supported on the node
        if (!canForceShutdown) {
            // allow this proxy to keep going
            disableMaxSessions();
            scheduledShutdown = false;
            LOGGER.exiting();
            return;
        }

        // clean up the test slots
        for (TestSlot slot : getTestSlots()) {
            if (slot.getSession() != null) {
                totalSessionsCompleted++;
                proxyLogger.info("Timing out session #" + totalSessionsCompleted + " (" + slot.getSession().toString()
                        + ")");
                getRegistry().forceRelease(slot, SessionTerminationReason.TIMEOUT);
            }
        }

        // call the node servlet
        List<NameValuePair> nvps = new ArrayList<>();
        nvps.add(new BasicNameValuePair(NodeForceRestartServlet.TOKEN_PARAMETER,
                NodeForceRestartServlet.CONFIGURED_TOKEN_VALUE));

        HttpResponse response = sendToNodeServlet(NodeForceRestartServlet.class, nvps);
        if (response == null) {
            proxyLogger.warning("Node " + getId() + " failed to shutdown and returned a null response.");
            // stop the polling thread, mark this proxy as down, force this proxy to re-register
            teardown("it failed to shutdown and must re-register");
            LOGGER.exiting();
            return;
        }

        final int responseStatusCode = response.getStatusLine().getStatusCode();
        if (responseStatusCode != HttpStatus.SC_OK) {
            proxyLogger.warning("Node " + getId() + " did not shutdown and returned HTTP " + responseStatusCode);
            // stop the polling thread, mark this proxy as down, force this proxy to re-register
            teardown("it failed to shutdown and must re-register");
            LOGGER.exiting();
            return;
        }

        // stop the polling thread, mark this proxy as down
        teardown("it is shutdown");

        proxyLogger.info("Node " + getId() + " shutdown successfully.");

        LOGGER.exiting();
    }
861253
def stop(opts = {})
      mutex.synchronize do
        check_process!

        log(:debug) { "Stop on #{uri}..." }

        connection.release
        connection.delete if opts[:delete]
        connection.close
        dispatcher.shutdown

        reset
      end
    end
82110
public void close() {
        try {
            // Request BMP to create a new HAR for this Proxy
            HttpDelete shutdownProxyDELETE = new HttpDelete(requestURIBuilder()
                    .setPath(proxyURIPath())
                    .build());

            // Execute request
            CloseableHttpResponse response = HTTPclient.execute(shutdownProxyDELETE);

            // Check request was successful
            int statusCode = response.getStatusLine().getStatusCode();
            if (statusCode != 200) {
                throw new BMPCUnableToCloseProxyException(String.format(
                        "Invalid HTTP Response when attempting to close " +
                                "Proxy '%d'. Status code: %d",
                        proxyPort, statusCode));
            }
            // Close HTTP Response
            response.close();

            // Close HTTP Client
            HTTPclient.close();
        } catch (Exception e) {
            throw new BMPCUnableToCloseProxyException(e);
        }
    }
1001403
def do_proxy_failover(self, proxy_url, for_url):
        
        self._proxy_resolver.ban_proxy(proxy_url)
        return self._proxy_resolver.get_proxy_for_requests(for_url)
242782
function(callback){
        callback = callback || noop;

        if(!this._client){
            return callback();
        }
        this._client.shutdown(function(err){
            if(!this._define_connection){
                return callback(err);
            }
            this._define_connection.shutdown(function(derr){
                callback(err || derr);
            });
        }.bind(this));
    }
1285519
func stop(proxy *Proxy) {
	if !proxy.Enabled {
		return
	}
	proxy.Enabled = false

	proxy.tomb.Killf("Shutting down from stop()")
	proxy.tomb.Wait() // Wait until we stop accepting new connections

	proxy.connections.Lock()
	defer proxy.connections.Unlock()
	for _, conn := range proxy.connections.list {
		conn.Close()
	}

	logrus.WithFields(logrus.Fields{
		"name":     proxy.Name,
		"proxy":    proxy.Listen,
		"upstream": proxy.Upstream,
	}).Info("Terminated proxy")
}
607049
def shutdown(self):
        
        self._handlertask.cancel()

        if self._timeout_handler:
            self._timeout_handler.cancel()
        self._transport = None
        self._stream_reader = None
        self._stream_writer.close()
        for i, task in self.tasks.items():
            task.cancel()
        self._stream_writer = None
        logger.info("close connection with {}".format(
            self._remote_host
        ))
345593
public static void disableProxy() {
        System.clearProperty("http.proxyHost");
        System.clearProperty("http.proxyPort");
        System.clearProperty("http.proxyUserName");
        System.clearProperty("http.proxyUser");
        System.clearProperty("http.proxyPassword");
        System.clearProperty("https.proxyHost");
        System.clearProperty("https.proxyPort");
        System.clearProperty("https.proxyUserName");
        System.clearProperty("https.proxyUser");
        System.clearProperty("https.proxyPassword");

        _url = null;
        _port = null;
        _user = null;
        _pwd = null;
        hasProxy = false;
    }
1281495
protected void releaseProxyReadBuffer() {
        WsByteBuffer buffer = connLink.getReadInterface().getBuffer();
        if (null != buffer) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Releasing proxy read buffer: " + buffer);
            }
            buffer.release();
            connLink.getReadInterface().setBuffer(null);
        }
    }
236574
public void close() {
        if(nativeProxy!=0) {
            new Task<Void>() {
                public Void call() {
                    Native.unadvise(nativeProxy);
                    return null;
                }
            }.execute();
            nativeProxy = 0;
        }
    }