From 2729ad195b5dd6a12d57c782739726c4b74f780e Mon Sep 17 00:00:00 2001 From: Rui Abreu Ferreira Date: Wed, 5 Nov 2014 19:45:16 +0000 Subject: msgpack-rpc: Don't try to write into a closed channel --- src/nvim/msgpack_rpc/channel.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 5564bfa1be..3ab868998c 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -491,6 +491,10 @@ static bool channel_write(Channel *channel, WBuffer *buffer) { bool success; + if (channel->closed) { + return false; + } + if (channel->is_job) { success = job_write(channel->data.job, buffer); } else { -- cgit