aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-08-12 15:01:03 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-08-28 14:18:05 -0300
commitdc34f9fc94e6a155e33f3c7d996f1a0b801ba8a7 (patch)
tree0cdd423b818c71560ae150153eeff174e29a88fb /src
parent801ed0e0a3489af98ca2823ee70332bcad968cba (diff)
downloadrneovim-dc34f9fc94e6a155e33f3c7d996f1a0b801ba8a7.tar.gz
rneovim-dc34f9fc94e6a155e33f3c7d996f1a0b801ba8a7.tar.bz2
rneovim-dc34f9fc94e6a155e33f3c7d996f1a0b801ba8a7.zip
channel: Fix channel not being closed when the RStream reaches EOF
Diffstat (limited to 'src')
-rw-r--r--src/nvim/os/channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/os/channel.c b/src/nvim/os/channel.c
index 1a2efca513..8e02478eff 100644
--- a/src/nvim/os/channel.c
+++ b/src/nvim/os/channel.c
@@ -278,6 +278,7 @@ static void job_err(RStream *rstream, void *data, bool eof)
static void parse_msgpack(RStream *rstream, void *data, bool eof)
{
Channel *channel = data;
+ channel->rpc_call_level++;
if (eof) {
char buf[256];
@@ -287,10 +288,9 @@ static void parse_msgpack(RStream *rstream, void *data, bool eof)
"closed by the client",
channel->id);
call_set_error(channel, buf);
- return;
+ goto end;
}
- channel->rpc_call_level++;
uint32_t count = rstream_available(rstream);
DLOG("Feeding the msgpack parser with %u bytes of data from RStream(%p)",
count,