channel: Fix unpacker loop condition

This commit is contained in:
Thiago de Arruda 2014-09-16 14:17:36 -03:00
parent ddecfb763b
commit 0669c5c0b1

View File

@ -353,7 +353,8 @@ static void parse_msgpack(RStream *rstream, void *data, bool eof)
msgpack_unpack_return result;
// Deserialize everything we can.
while ((result = msgpack_unpacker_next(channel->unpacker, &unpacked))) {
while ((result = msgpack_unpacker_next(channel->unpacker, &unpacked)) ==
MSGPACK_UNPACK_SUCCESS) {
if (kv_size(channel->call_stack) && is_rpc_response(&unpacked.data)) {
if (is_valid_rpc_response(&unpacked.data, channel)) {
call_stack_pop(&unpacked.data, channel);