From 63009111271adcfcb668353ccbf64dea6b672804 Mon Sep 17 00:00:00 2001 From: Volodymyr Chernetskyi Date: Fri, 16 Oct 2026 12:34:53 +0200 Subject: fix(health): stop timed-out provider probe jobs #42390 Problem: The timeout handler raises an error before jobstop(), leaving the provider probe running after the healthcheck fails. Solution: Stop the job before raising the timeout error. AI-assisted --- runtime/lua/vim/provider/health.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/lua') diff --git a/runtime/lua/vim/provider/health.lua b/runtime/lua/vim/provider/health.lua index e6654f3e67..a7ae73b0be 100644 --- a/runtime/lua/vim/provider/health.lua +++ b/runtime/lua/vim/provider/health.lua @@ -87,8 +87,8 @@ local function system(cmd, args) local res = vim.fn.jobwait({ jobid }, math.floor(vim.nonnil(args.timeout, 30) * 1000)) if res[1] == -1 then - error('Command timed out: ' .. shellify(cmd)) vim.fn.jobstop(jobid) + error('Command timed out: ' .. shellify(cmd)) elseif shell_error_code ~= 0 and not ignore_error then local emsg = string.format( 'Command error (job=%d, exit code %d): %s (in %s)', -- cgit