Pause accept new connections.

@return void
358431
public function pauseAccept()
    {
        if (static::$globalEvent && false === $this->_pauseAccept && $this->_mainSocket) {
            static::$globalEvent->del($this->_mainSocket, EventInterface::EV_READ);
            $this->_pauseAccept = true;
        }
    }
1229989
public function pauseProcessing()
	{
		$this->logger->log(Psr\Log\LogLevel::NOTICE, 'USR2 received; pausing job processing');
		$this->paused = true;
	}
738202
public function onReady()
    {
        if ($this->isEnabled()) {
            $this->updateTimer = setTimeout(function ($timer) {
                $this->updateAllServers();
                $timer->timeout(2e6);
            }, 1);
        }
    }
952717
def pause(self):
        """"""
        self._mq.send("p", True, type=1)
        self._paused = True
1196073
public function pause()
    {
        if ($this->state !== self::STATE_STARTED) {
            return false;
        }

        $time = microtime(true);

        $this->runtime += ($time - $this->startTime);
        $this->startTime = null;
        $this->setState(self::STATE_PAUSED);

        return true;
    }
503171
def pause(self):
        """"""
        res = librtmp.RTMP_Pause(self.client.rtmp, 1)

        if res < 1:
            raise RTMPError("Failed to pause")
122016
function connect_again() {
            if ( ! $this->is_anonymous() ) {
                return;
            }

            $this->reset_anonymous_mode( fs_is_network_admin() );

            $this->maybe_set_slug_and_network_menu_exists_flag();

            fs_redirect( $this->get_activation_url() );
        }
612316
def pause(self):
        
        self._pause = False if self._pause else True
        self._send_command('pause')
55318
function() {
            var waitingOrConnected = connectionManager.getWaitingOrConnected(),
                i;

            // ensure files are cancelled in reverse order which they were added
            // to avoid a flash of time where a queued file begins to upload before it is canceled
            if (waitingOrConnected.length) {
                for (i = waitingOrConnected.length - 1; i >= 0; i--) {
                    controller.cancel(waitingOrConnected[i]);
                }
            }

            connectionManager.reset();
        }
1210308
public function pauseActiveExecutions()
    {
        if (!$this->isRequestPost()) {
            throw new \common_exception_BadRequest('Invalid request. Only POST method allowed.');
        }

        $reason = $this->hasRequestParameter('reason') ? $this->getRequestParameter('reason') : [
            'reasons' => ['category' => 'Technical', 'subCategory' => 'ACT'],
            'comment' => __('Pause due to server maintenance'),
        ];
        /** @var DeliveryMonitoringService $monitoringService */
        $monitoringService = $this->getServiceLocator()->get(DeliveryMonitoringService::SERVICE_ID);
        $deliveryExecutions = $monitoringService->find(
            [DeliveryMonitoringService::STATUS => DeliveryExecution::STATE_ACTIVE],
            ['asArray' => true]
        );
        $ids = array_map(function ($deliveryExecution) {
            return $deliveryExecution['delivery_execution_id'];
        }, $deliveryExecutions);
        $stats = DeliveryHelper::pauseExecutions($ids, $reason);
        $paused = $stats['processed'];
        $notPaused = $stats['unprocessed'];

        $this->returnJson([
            'success' => true,
            'data' => [
                'message' => count($paused) . ' ' . __('sessions paused'),
                'processed' => $paused,
                'unprocessed' => $notPaused
            ]
        ]);
    }
327840
public static function disconnect(): void
  {
    if (self::$dl!==null)
    {
      self::$dl->disconnect();
      self::$dl = null;
    }
  }
1308588
protected function anotherConnectionStillOpen()
    {
        $this->appInstance->setkey('error:' . $this->sessId, 1002, function () {
            $this->appInstance->expire('error:' . $this->sessId, $this->appInstance->config->deadsessiontimeout->value,
                function () {
                    $this->error(2010);
                });
        });
    }
59400
private void onConnectSucceeded(){
        LOGGER.info("Accepted the connection.");

        isConnected = true;
        isConnecting = false;
        enableReadOnly();
        synchronized(connectHolder){
            connectHolder.notifyAll();
        }
    }
367071
private PauseResult<PersistableUpload> pause(
            final boolean forceCancelTransfers) throws AmazonClientException {
        UploadMonitor uploadMonitor = (UploadMonitor) monitor;
        return uploadMonitor.pause(forceCancelTransfers);
    }
854164
public function handleClose()
    {
        $this->pause();

        if (is_resource($this->socket))
        {
            if ($this->getStreamType() === Socket::TYPE_UNIX)
            {
                $path = substr($this->parseEndpoint(), 7);
                unlink($path);
            }
            fclose($this->socket);
        }
    }
1051240
def pause(self) -> None:
        """"""
        with self.__state_lock:
            if self.__state == DataChannelBuffer.State.started:
                self.__state = DataChannelBuffer.State.paused
983834
def pause(env, identifier):
    """"""

    vsi = SoftLayer.VSManager(env.client)
    vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS')

    if not (env.skip_confirmations or
            formatting.confirm('This will pause the VS with id %s. Continue?'
                               % vs_id)):
        raise exceptions.CLIAbort('Aborted.')

    env.client['Virtual_Guest'].pause(id=vs_id)