Currently a closed client will reconnect if run_cmd gets called on it, but will not actually send the command once it is ready again. (Technically, it calls send method too soon, before the reconnection has succeeded, which just calls connect yet again instead of sending the command.)
Then it gets stuck in a state where it is marked waiting for response to a command it never sent.
This behavior is non-intuitive, it should either properly wait for reconnection before sending the command, or not attempt reconnection and emit an error.
Currently a closed client will reconnect if run_cmd gets called on it, but will not actually send the command once it is ready again. (Technically, it calls send method too soon, before the reconnection has succeeded, which just calls connect yet again instead of sending the command.)
Then it gets stuck in a state where it is marked waiting for response to a command it never sent.
This behavior is non-intuitive, it should either properly wait for reconnection before sending the command, or not attempt reconnection and emit an error.