Skip to content

Setting _in_multi before checking the connection #32

@chengyang-binary

Description

@chengyang-binary

Hi,

The $redis->multi; line below fails when the connection is dropped (before calling the code).

We gone through the code and realised that if multi is called even when the connection is dropped, it first sets the _in_multi to true, then it checks the connection, then throws error.
(https://github.com/trinitum/RedisDB/blob/master/lib/RedisDB.pm#L1664)

Is that intended behaviour ? It would be great if it checks for connection and throws error before setting the flag. That would cause it to not pass through multiple subroutines before realising there is no connection then throws an error, which causes it harder to debug.

Thanks!

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