Skip to content

Incorrect argument count causes followup call to hang #1846

Closed
@chibisuke

Description

@chibisuke

Calling a node-redis function with an invalid argument count like in the below example causes all following calls to stall.

reproduction code:

(async () => {
    const { createClient } = require('redis');
    const redis = createClient();
    
    await redis.connect();

    await redis.hmGet("bla").catch((e) => console.log(e));
    console.log("after hmGet");
    console.log(await redis.ping()); //ping does NOT return in this example
    console.log("after ping");
})();

Restarting the connection (redis.quit() redis.connect()) doesn't do anything either. 1

Environment:

  • Node.js Version: v16.13.2
  • Redis Server Version: 255.255.255
  • Node Redis Version: 4.0.2
  • Platform: Debian

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions