Amp\Artax\SocketPool::unloadSocket PHP Method

unloadSocket() private method

private unloadSocket ( $uri, $socketId )
    private function unloadSocket($uri, $socketId)
    {
        if (!isset($this->sockets[$uri][$socketId])) {
            return;
        }
        $poolStruct = $this->sockets[$uri][$socketId];
        if ($poolStruct->idleWatcher) {
            \Amp\cancel($poolStruct->idleWatcher);
        }
        unset($this->sockets[$uri][$socketId], $this->socketIdUriMap[$socketId]);
        if (empty($this->sockets[$uri])) {
            unset($this->sockets[$uri][$socketId]);
        }
        if (!empty($this->queuedSocketRequests[$uri])) {
            $this->dequeueNextWaitingSocket($uri);
        }
    }