Skip to content

Clarification: Expected behavior of calling QUIT on a reconnecting client #2341

Open
@JPricey

Description

@JPricey

Hi,
What is the expected behavior of calling quit on a redis client which isOpen but not isReady, such as for a client which is attempting to reconnect to redis?
Currently it seems that ClientClosedError is raised immediately, even when the offline queue is enabled. Since in the normal case quit attempts to finish other commands which are in progress first before closing a connection, I might expect the client to wait until a reconnect attempt finishes after quit is called to either:

  • run queued commands and then disconnect, if the reconnect was a success
  • flush all queued commands and disconnect permanently, if the reconnect attempt failed

Thanks!

Environment:

  • Node Redis Version: 4.5.1

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