aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nvim/event/loop.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/event/loop.c b/src/nvim/event/loop.c
index c2be472acd..664f3ad89d 100644
--- a/src/nvim/event/loop.c
+++ b/src/nvim/event/loop.c
@@ -127,8 +127,8 @@ bool loop_close(Loop *loop, bool wait)
uv_close((uv_handle_t *)&loop->async, NULL);
uint64_t start = wait ? os_hrtime() : 0;
while (true) {
- uv_run(&loop->uv, wait ? UV_RUN_DEFAULT : UV_RUN_NOWAIT);
- if (!uv_loop_close(&loop->uv) || !wait) {
+ uv_run(&loop->uv, UV_RUN_NOWAIT);
+ if (!wait || (uv_loop_close(&loop->uv) != UV_EBUSY)) {
break;
}
if (os_hrtime() - start >= 2 * 1000000000) {