msgpack-rpc: Close channel on invalid msgpack RPC

- When an invalid msgpack RPC msg is received from a channel
  we now close that channel all calls on that channel fail with
  an error message.
This commit is contained in:
Rui Abreu Ferreira 2014-11-05 19:49:03 +00:00 committed by Thiago de Arruda
parent 2729ad195b
commit 4e880f3f00

View File

@ -436,6 +436,11 @@ static void handle_request(Channel *channel, msgpack_object *request)
&error,
NIL,
&out_buffer));
char buf[256];
snprintf(buf, sizeof(buf),
"Channel %" PRIu64 " sent an invalid message, closing.",
channel->id);
call_set_error(channel, buf);
return;
}