mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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:
parent
2729ad195b
commit
4e880f3f00
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user