redigo/redis supports a special blank command in Do which flushes the
connection's output buffer and receives all pending replies (if any).
redigo/redis uses this when a connection is returned to its pool to
ensure that the connection is ready for re-use no matter what state it
is returned in.
This commit fixes the redisc connection's Do wrapper when called with
the blank command:
If the connection is not currently bound to a node, it is not bound to
a random node anymore. It immediately returns, instead.
If the connection is bound to a node, do not re-bind to another node.
Pass along the special blank command to the underlying redigo/redis
connection.
redigo/redis supports a special blank command in Do which flushes the connection's output buffer and receives all pending replies (if any). redigo/redis uses this when a connection is returned to its pool to ensure that the connection is ready for re-use no matter what state it is returned in.
This commit fixes the redisc connection's Do wrapper when called with the blank command:
If the connection is not currently bound to a node, it is not bound to a random node anymore. It immediately returns, instead.
If the connection is bound to a node, do not re-bind to another node. Pass along the special blank command to the underlying redigo/redis connection.