aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/event/stream.c')
-rw-r--r--src/nvim/event/stream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/event/stream.c b/src/nvim/event/stream.c
index 7c865bfe1e..ba25b76ec7 100644
--- a/src/nvim/event/stream.c
+++ b/src/nvim/event/stream.c
@@ -92,6 +92,13 @@ void stream_close(Stream *stream, stream_close_cb on_stream_close, void *data)
}
}
+void stream_may_close(Stream *stream)
+{
+ if (!stream->closed) {
+ stream_close(stream, NULL, NULL);
+ }
+}
+
void stream_close_handle(Stream *stream)
FUNC_ATTR_NONNULL_ALL
{