mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
channel: Fix channel not being closed when the RStream reaches EOF
This commit is contained in:
parent
801ed0e0a3
commit
dc34f9fc94
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user