Coder Social home page Coder Social logo

ok-redis's People

Contributors

gorankarlic avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ok-redis's Issues

"const client = await Redis.connect(opts);" not working as intended.

In case of using
const client = await Redis.connect(opts);
RedisClient.connect will return a Promise to the Redis.connect function which ignores the promise and just proceeds to return the client instead of a promise that would return the client. Thous any error that occurs during the connect will throw an UnhandlePromisRejectionWarning and keeps the app dangling.

class Redis
{
    ...
    static connect(opts = new RedisOpts(), done = void null)
    {
        const client = new RedisClient(opts.opts);
        client.connect(done); 
        return client;
    }
    ...
}

class RedisClient extends Commands
{
    ...
    connect(done)
    {
        if(done === void null)
        {
            return new Promise((resolve, reject) => this._client.connect((err, result) => err === null ? resolve(result) : reject(err)));
        }
        else
        {
            this._client.connect(done);
        }
    };
    ...
}

command processing seems to mess up its index while reading arguments

There seems to be some index(?) issue somewhere in the cluster command processing.

I get a couple of error of these kinds:

RedisError: ERR unknown command bkt:-72:-396, with args beginning with:
at processTicksAndRejections (internal/process/task_queues.js:85:5) {
name: 'RedisError'
}
Edit: bkt:-72:-396 should be the key here, not the command.

RedisError: ERR unknown command 1, with args beginning with:
at processTicksAndRejections (internal/process/task_queues.js:85:5) {
name: 'RedisError'
}

RedisError: ERR Protocol error: expected '$', got ' '
at processTicksAndRejections (internal/process/task_queues.js:85:5) {
name: 'RedisError'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.