diff options
| author | Volodymyr Chernetskyi <volodymyr_chernetskyi@goodyear.com> | 2026-10-16 12:34:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-16 06:34:53 -0400 |
| commit | 63009111271adcfcb668353ccbf64dea6b672804 (patch) | |
| tree | a0feaa4f05574830a9b1f66e92ea8120bd5eceb6 /runtime | |
| parent | 1c91e5a7f0b1d47716c90d126f3e46c91ad0176e (diff) | |
| download | rneovim-63009111271adcfcb668353ccbf64dea6b672804.tar.gz rneovim-63009111271adcfcb668353ccbf64dea6b672804.tar.bz2 rneovim-63009111271adcfcb668353ccbf64dea6b672804.zip | |
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
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/lua/vim/provider/health.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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)', |