channel: Fix channel not being closed when the RStream reaches EOF

This commit is contained in:
Thiago de Arruda 2014-08-12 15:01:03 -03:00
parent 801ed0e0a3
commit dc34f9fc94

View File

@ -278,6 +278,7 @@ static void job_err(RStream *rstream, void *data, bool eof)
static void parse_msgpack(RStream *rstream, void *data, bool eof) static void parse_msgpack(RStream *rstream, void *data, bool eof)
{ {
Channel *channel = data; Channel *channel = data;
channel->rpc_call_level++;
if (eof) { if (eof) {
char buf[256]; char buf[256];
@ -287,10 +288,9 @@ static void parse_msgpack(RStream *rstream, void *data, bool eof)
"closed by the client", "closed by the client",
channel->id); channel->id);
call_set_error(channel, buf); call_set_error(channel, buf);
return; goto end;
} }
channel->rpc_call_level++;
uint32_t count = rstream_available(rstream); uint32_t count = rstream_available(rstream);
DLOG("Feeding the msgpack parser with %u bytes of data from RStream(%p)", DLOG("Feeding the msgpack parser with %u bytes of data from RStream(%p)",
count, count,