wooga / eredis

Erlang Redis client
MIT License
628 stars 280 forks source link

Correct a bug when parsing splitted error response #121

Closed bjosv closed 3 years ago

bjosv commented 4 years ago

If only the beginning of an error response is got during a socket read, the consecutive read(s) will contain the rest of the Redis error msg. Each read will trigger a call to the parser to find a complete message.

If an error response message is read and completed in one iteration, this correctly will result in a {error, ...} but if the message is read in more than one iteration it will result in a non-correct {ok, ...}

This fixes so an Redis error message always results in a {error, ...}