v2.7.11-braze: Flush pending responses after exiting multi (#1)
Latest
naveg
released this
09 Apr 15:32
* Flush pending responses after exiting multi
* Fix response flushing after noop
The `noop` operation was broken - it was assuming that all responses are
key/value pairs, as would be the case after a `get_multi`.
However, `noop` can be done at any time. In particular, it can be done
to conclude a `multi` block.
Correctly drain the responses by checking the key length and status, and
reading but discarding any response bodies.
This mirrors how the latest version of Dalli works:
https://github.com/petergoldstein/dalli/blob/main/lib/dalli/protocol/binary/response_processor.rb#L150
* Add test from https://github.com/petergoldstein/dalli/pull/844/files
* Only read body if there is something to read