Closed leedo closed 12 years ago
This patch (2154c734fa49e1daea4cb492e5971ce1e5e6f065) partially fixes the problem. It is included in @chipdude's large error handling pull req, but might be worth an immediate fix since it seems really broken right now.
I dug a little deeper into this and it looks like this is what is happening:
So I think what needs to happen is one reconnect attempt should be made immediately after on_error.
I made a pull req that is working on this: https://github.com/miyagawa/AnyEvent-Redis/pull/19
If a command fails due to a connection error, the client reconnects and queues the original command and callback. The command is retried but fails due to the broken connection, and the command remains in the queue. When the next successful command is issued (say 15 seconds later) the original command and callback are still in the queue and get run.
Using the CondVar style behaves more as I expected, sending to the CondVar callback immediately on connection error.