diff options
Diffstat (limited to 'src/nvim/msgpack_rpc/channel.c')
-rw-r--r-- | src/nvim/msgpack_rpc/channel.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c index 10d180b3b7..c2d16d170f 100644 --- a/src/nvim/msgpack_rpc/channel.c +++ b/src/nvim/msgpack_rpc/channel.c @@ -600,11 +600,16 @@ static void close_channel(Channel *channel) if (handle) { uv_close(handle, close_cb); } else { - mch_exit(0); + event_push((Event) { .handler = on_stdio_close }, false); } } } +static void on_stdio_close(Event e) +{ + mch_exit(0); +} + static void free_channel(Channel *channel) { pmap_del(uint64_t)(channels, channel->id); |