src/Pool/RedisPool.php
public function createConnection(): ConnectionInterface
    {
        if (App::isCoContext()) {
            $redis = new RedisConnection($this);
        } else {
            $redis = new SyncRedisConnection($this);
        }

        return $redis;
    }
public function createConnection(): ConnectionInterface
    {
        if (App::isCoContext()) {
            $redis = new RedisConnection($this);
        } else {
            $redis = new SyncRedisConnection($this);
        }

        return $redis;
    }
Create connection

@return ConnectionInterface