redis-rb icon indicating copy to clipboard operation
redis-rb copied to clipboard

Explicitly raise InvalidResponse if commands and responses counts don't match

Open byroot opened this issue 9 years ago • 1 comments

As discussed in https://github.com/redis/redis-rb/pull/509

The idea here is to fail loudly if such unlikely race condition happened.

@djanowski is this more acceptable to you?

byroot avatar Nov 16 '15 19:11 byroot

I fixed the typo, and refactored ProtocolError so I can reuse it.

I honestly think the pop is simpler and better than the copy. I mean I get your point about not mutating arguments, but in this case it's a method responsible for parsing a response. So I really don't expect any further usage of that object.

That being said I don't think super strongly about it. So I can totally do a slice instead. Just let me know.

byroot avatar Nov 17 '15 00:11 byroot

We no longer need this because pipelines are serialized eagerly.

byroot avatar Aug 17 '22 18:08 byroot