Skip to content

No way to quit a BLOCKed connection? #2746

Closed
@PaulHamdinger

Description

@PaulHamdinger

Am I right in understanding that there is no way to disconnect a client while that client is blocking? I have a script where I keep an XREAD open indefinitely with BLOCK 0, but when it's time to exit my script I can't call quit() (it never completes) or disconnect() ("DisconnectsClientError").

...
redis_client.sendCommand( [ `XREAD`, `BLOCK`, `0`, `STREAMS`, `foo:bar`, `$` ] );
await redis_client.quit(); // Queue'd forever? Never run.
await redis_client.disconnect(); // Error : DisconnectsClientError: Disconnects client at Commander.disconnect...
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions