private function queryClusterNodeForSlotsMap(NodeConnectionInterface $connection)
{
$retries = 0;
$command = RawCommand::create('CLUSTER', 'SLOTS');
RETRY_COMMAND:
try {
$response = $connection->executeCommand($command);
} catch (ConnectionException $exception) {
$connection = $exception->getConnection();
$connection->disconnect();
$this->remove($connection);
if ($retries === $this->retryLimit) {
throw $exception;
}
if (!($connection = $this->getRandomConnection())) {
throw new ClientException('No connections left in the pool for `CLUSTER SLOTS`');
}
++$retries;
goto RETRY_COMMAND;
}
return $response;
}