madsimian/em-redis

Reconnecting doesn't reinvoke command, leads to hang

Opened this issue · 0 comments

When the client disconnects (potentially due to timeout?) the previous command is not restarted nor is there any notification (callback). If the consumer was waiting on a command -- say a blocking one like BRPOP -- then the consumer will end up hanging indefinitely as em-redis will not reinvoke the command after the reconnect. However, given that not all commands are idempotent, a better way would be to invoke a 'reconnect' callback after em-redis reconnects.